Changeset 18133 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2021-08-15T13:24:41+02:00 (3 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/SessionSaveAsAction.java
r17733 r18133 44 44 import org.openstreetmap.josm.io.session.SessionWriter; 45 45 import org.openstreetmap.josm.tools.GBC; 46 import org.openstreetmap.josm.tools.JosmRuntimeException; 46 47 import org.openstreetmap.josm.tools.Logging; 47 48 import org.openstreetmap.josm.tools.MultiMap; … … 210 211 211 212 for (Layer layer : layers) { 212 SessionLayerExporter exporter = SessionWriter.getSessionLayerExporter(layer); 213 SessionLayerExporter exporter = null; 214 try { 215 exporter = SessionWriter.getSessionLayerExporter(layer); 216 } catch (IllegalArgumentException | JosmRuntimeException e) { 217 Logging.error(e); 218 } 213 219 if (exporter != null) { 214 220 exporters.put(layer, exporter); -
trunk/src/org/openstreetmap/josm/io/session/GpxTracksSessionExporter.java
r16865 r18133 27 27 protected GpxTracksSessionExporter(GpxLayer layer, String type) { 28 28 super(layer, type, "0.1", "gpx"); 29 if (layer.data == null) { 30 throw new IllegalArgumentException("GPX layer without data: " + layer); 31 } 29 32 } 30 33 -
trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java
r17659 r18133 97 97 * @param layer layer to export 98 98 * @return session layer exporter for the given layer 99 * @throws IllegalArgumentException if layer cannot be exported 99 100 */ 100 101 public static SessionLayerExporter getSessionLayerExporter(Layer layer) {
Note:
See TracChangeset
for help on using the changeset viewer.