Changeset 11374 in josm for trunk/src/org/openstreetmap/josm/data/osm
- Timestamp:
- 2016-12-09T23:31:13+01:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/osm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/DataSet.java
r11269 r11374 46 46 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 47 47 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionManager; 48 import org.openstreetmap.josm.tools.JosmRuntimeException; 48 49 import org.openstreetmap.josm.tools.SubclassFilteredCollection; 49 50 import org.openstreetmap.josm.tools.Utils; … … 516 517 } 517 518 if (!success) 518 throw new RuntimeException("failed to add primitive: "+primitive);519 throw new JosmRuntimeException("failed to add primitive: "+primitive); 519 520 firePrimitivesAdded(Collections.singletonList(primitive), false); 520 521 } finally { … … 547 548 } 548 549 if (!success) 549 throw new RuntimeException("failed to remove primitive: "+primitive);550 throw new JosmRuntimeException("failed to remove primitive: "+primitive); 550 551 synchronized (selectionLock) { 551 552 selectedPrimitives.remove(primitive); … … 1063 1064 private void reindexNode(Node node, LatLon newCoor, EastNorth eastNorth) { 1064 1065 if (!nodes.remove(node)) 1065 throw new RuntimeException("Reindexing node failed to remove");1066 throw new JosmRuntimeException("Reindexing node failed to remove"); 1066 1067 node.setCoorInternal(newCoor, eastNorth); 1067 1068 if (!nodes.add(node)) 1068 throw new RuntimeException("Reindexing node failed to add");1069 throw new JosmRuntimeException("Reindexing node failed to add"); 1069 1070 for (OsmPrimitive primitive: node.getReferrers()) { 1070 1071 if (primitive instanceof Way) { … … 1079 1080 BBox before = way.getBBox(); 1080 1081 if (!ways.remove(way)) 1081 throw new RuntimeException("Reindexing way failed to remove");1082 throw new JosmRuntimeException("Reindexing way failed to remove"); 1082 1083 way.updatePosition(); 1083 1084 if (!ways.add(way)) 1084 throw new RuntimeException("Reindexing way failed to add");1085 throw new JosmRuntimeException("Reindexing way failed to add"); 1085 1086 if (!way.getBBox().equals(before)) { 1086 1087 for (OsmPrimitive primitive: way.getReferrers()) { -
trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java
r10308 r11374 18 18 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 19 19 import org.openstreetmap.josm.tools.CheckParameterUtil; 20 import org.openstreetmap.josm.tools.JosmRuntimeException; 20 21 21 22 /** … … 143 144 Way myWay = (Way) getMergeTarget(other); 144 145 if (myWay == null) 145 throw new RuntimeException(tr("Missing merge target for way with id {0}", other.getUniqueId()));146 throw new JosmRuntimeException(tr("Missing merge target for way with id {0}", other.getUniqueId())); 146 147 } 147 148 … … 178 179 OsmPrimitive source = sourceDataSet.getPrimitiveById(target.getPrimitiveId()); 179 180 if (source == null) 180 throw new RuntimeException(181 throw new JosmRuntimeException( 181 182 tr("Object of type {0} with id {1} was marked to be deleted, but it''s missing in the source dataset", 182 183 target.getType(), target.getUniqueId()));
Note:
See TracChangeset
for help on using the changeset viewer.