- Timestamp:
- 2016-12-09T23:31:13+01:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 1 added
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r11352 r11374 100 100 import org.openstreetmap.josm.tools.I18n; 101 101 import org.openstreetmap.josm.tools.ImageProvider; 102 import org.openstreetmap.josm.tools.JosmRuntimeException; 102 103 import org.openstreetmap.josm.tools.Logging; 103 104 import org.openstreetmap.josm.tools.OpenBrowser; … … 560 561 service.shutdown(); 561 562 } catch (InterruptedException | ExecutionException ex) { 562 throw new RuntimeException(ex); 563 throw new JosmRuntimeException(ex); 563 564 } 564 565 -
trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java
r11315 r11374 45 45 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 46 46 import org.openstreetmap.josm.tools.Geometry; 47 import org.openstreetmap.josm.tools.JosmRuntimeException; 47 48 import org.openstreetmap.josm.tools.Pair; 48 49 import org.openstreetmap.josm.tools.Shortcut; … … 1125 1126 WayInPolygon nextWay = traverser.walk(); 1126 1127 if (nextWay == null) 1127 throw new RuntimeException("Join areas internal error."); 1128 throw new JosmRuntimeException("Join areas internal error."); 1128 1129 if (path.get(0) == nextWay) { 1129 1130 // path is closed -> stop here … … 1180 1181 while ((nextWay = traverser.walk()) != startWay) { 1181 1182 if (nextWay == null) 1182 throw new RuntimeException("Join areas internal error."); 1183 throw new JosmRuntimeException("Join areas internal error."); 1183 1184 simpleRingWays.add(nextWay); 1184 1185 } … … 1254 1255 //should not happen 1255 1256 if (joinedWay == null || !joinedWay.isClosed()) 1256 throw new RuntimeException("Join areas internal error."); 1257 throw new JosmRuntimeException("Join areas internal error."); 1257 1258 1258 1259 return joinedWay; -
trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
r11116 r11374 31 31 import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil; 32 32 import org.openstreetmap.josm.gui.Notification; 33 import org.openstreetmap.josm.tools.JosmRuntimeException; 33 34 import org.openstreetmap.josm.tools.Shortcut; 34 35 … … 294 295 w.calcDirections(Direction.RIGHT.changeBy(directionOffset)); 295 296 if (angleToDirectionChange(refHeading - w.heading, TOLERANCE2) != 0) 296 throw new RuntimeException(); 297 throw new JosmRuntimeException("orthogonalize error"); 297 298 totSum = EN.sum(totSum, w.segSum); 298 299 } … … 403 404 } 404 405 } 405 if (!s.isEmpty()) throw new RuntimeException(); 406 if (!s.isEmpty()) throw new JosmRuntimeException("orthogonalize error"); 406 407 } 407 408 -
trunk/src/org/openstreetmap/josm/actions/search/PushbackTokenizer.java
r8846 r11374 12 12 13 13 import org.openstreetmap.josm.actions.search.SearchCompiler.ParseError; 14 import org.openstreetmap.josm.tools.JosmRuntimeException; 14 15 15 16 public class PushbackTokenizer { … … 74 75 c = search.read(); 75 76 } catch (IOException e) { 76 throw new RuntimeException(e.getMessage(), e); 77 throw new JosmRuntimeException(e.getMessage(), e); 77 78 } 78 79 } -
trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
r10711 r11374 55 55 import org.openstreetmap.josm.gui.widgets.HistoryComboBox; 56 56 import org.openstreetmap.josm.tools.GBC; 57 import org.openstreetmap.josm.tools.JosmRuntimeException; 57 58 import org.openstreetmap.josm.tools.Shortcut; 58 59 import org.openstreetmap.josm.tools.Utils; … … 229 230 tf.getDocument().insertString(tf.getCaretPosition(), ' ' + insertText, null); 230 231 } catch (BadLocationException ex) { 231 throw new RuntimeException(ex.getMessage(), ex); 232 throw new JosmRuntimeException(ex.getMessage(), ex); 232 233 } 233 234 } -
trunk/src/org/openstreetmap/josm/command/AddPrimitivesCommand.java
r11240 r11374 19 19 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 20 20 import org.openstreetmap.josm.tools.CheckParameterUtil; 21 import org.openstreetmap.josm.tools.JosmRuntimeException; 21 22 22 23 /** … … 170 171 OsmPrimitive osm = getAffectedDataSet().getPrimitiveById(d); 171 172 if (osm == null) 172 throw new RuntimeException(); 173 throw new JosmRuntimeException("No primitive found for " + d); 173 174 prims.add(osm); 174 175 } … … 188 189 AddPrimitivesCommand that = (AddPrimitivesCommand) obj; 189 190 return Objects.equals(data, that.data) && 190 191 192 191 Objects.equals(toSelect, that.toSelect) && 192 Objects.equals(createdPrimitives, that.createdPrimitives) && 193 Objects.equals(createdPrimitivesToSelect, that.createdPrimitivesToSelect); 193 194 } 194 195 } -
trunk/src/org/openstreetmap/josm/data/Preferences.java
r11288 r11374 73 73 import org.openstreetmap.josm.tools.ColorHelper; 74 74 import org.openstreetmap.josm.tools.I18n; 75 import org.openstreetmap.josm.tools.JosmRuntimeException; 75 76 import org.openstreetmap.josm.tools.ListenerList; 76 77 import org.openstreetmap.josm.tools.MultiMap; … … 1327 1328 } 1328 1329 } catch (IllegalAccessException ex) { 1329 throw new RuntimeException(ex); 1330 throw new JosmRuntimeException(ex); 1330 1331 } 1331 1332 } … … 1387 1388 value = multiMapFromJson(key_value.getValue()); 1388 1389 } else 1389 throw new RuntimeException("unsupported preference primitive type"); 1390 throw new JosmRuntimeException("unsupported preference primitive type"); 1390 1391 1391 1392 try { … … 1394 1395 throw new AssertionError(ex); 1395 1396 } catch (IllegalAccessException ex) { 1396 throw new RuntimeException(ex); 1397 throw new JosmRuntimeException(ex); 1397 1398 } 1398 1399 } -
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())); -
trunk/src/org/openstreetmap/josm/data/projection/Projections.java
r11042 r11374 44 44 import org.openstreetmap.josm.gui.preferences.projection.ProjectionPreference; 45 45 import org.openstreetmap.josm.io.CachedFile; 46 import org.openstreetmap.josm.tools.JosmRuntimeException; 46 47 import org.openstreetmap.josm.tools.Utils; 47 48 … … 147 148 pds = loadProjectionDefinitions("resource://data/projection/custom-epsg"); 148 149 } catch (IOException ex) { 149 throw new RuntimeException(ex); 150 throw new JosmRuntimeException(ex); 150 151 } 151 152 inits = new LinkedHashMap<>(); -
trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFileWrapper.java
r10212 r11374 6 6 7 7 import org.openstreetmap.josm.io.CachedFile; 8 import org.openstreetmap.josm.tools.JosmRuntimeException; 8 9 9 10 /** … … 57 58 instance.loadGridShiftFile(is, false); 58 59 } catch (IOException e) { 59 throw new RuntimeException(e); 60 throw new JosmRuntimeException(e); 60 61 } 61 62 } -
trunk/src/org/openstreetmap/josm/data/projection/proj/ClassProjFactory.java
r10208 r11374 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.data.projection.proj; 3 4 import org.openstreetmap.josm.tools.JosmRuntimeException; 3 5 4 6 /** … … 23 25 proj = projClass.getConstructor().newInstance(); 24 26 } catch (ReflectiveOperationException e) { 25 throw new RuntimeException(e); 27 throw new JosmRuntimeException(e); 26 28 } 27 29 return proj; -
trunk/src/org/openstreetmap/josm/data/projection/proj/SwissObliqueMercator.java
r10308 r11374 20 20 import org.openstreetmap.josm.data.projection.Ellipsoid; 21 21 import org.openstreetmap.josm.data.projection.ProjectionConfigurationException; 22 import org.openstreetmap.josm.tools.JosmRuntimeException; 22 23 23 24 // CHECKSTYLE.OFF: LineLength … … 108 109 while (abs(phi - prevPhi) > EPSILON) { 109 110 if (++iteration > 30) 110 throw new RuntimeException("Two many iterations"); 111 throw new JosmRuntimeException("Two many iterations"); 111 112 prevPhi = phi; 112 113 double s = 1 / alpha * (log(tan(PI / 4 + b / 2)) - k) + ellps.e -
trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
r11365 r11374 1030 1030 l.rename((String) value); 1031 1031 break; 1032 default: throw new RuntimeException(); 1032 default: 1033 throw new IllegalArgumentException("Wrong column: " + col); 1033 1034 } 1034 1035 fireTableCellUpdated(row, col); -
trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java
r11298 r11374 55 55 import org.openstreetmap.josm.tools.ImageProvider; 56 56 import org.openstreetmap.josm.tools.InputMapUtils; 57 import org.openstreetmap.josm.tools.JosmRuntimeException; 57 58 import org.openstreetmap.josm.tools.Shortcut; 58 59 import org.xml.sax.SAXException; … … 634 635 } catch (InterruptedException | InvocationTargetException e) { 635 636 // FIXME: signature of realRun should have a generic checked exception we could throw here 636 throw new RuntimeException(e); 637 throw new JosmRuntimeException(e); 637 638 } finally { 638 639 monitor.finishTask(); -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ConditionFactory.java
r10965 r11374 30 30 import org.openstreetmap.josm.gui.mappaint.mapcss.Condition.ToTagConvertable; 31 31 import org.openstreetmap.josm.tools.CheckParameterUtil; 32 import org.openstreetmap.josm.tools.JosmRuntimeException; 32 33 import org.openstreetmap.josm.tools.Utils; 33 34 … … 819 820 return not ^ (Boolean) method.invoke(null, e); 820 821 } catch (IllegalAccessException | InvocationTargetException ex) { 821 throw new RuntimeException(ex); 822 throw new JosmRuntimeException(ex); 822 823 } 823 824 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
r11360 r11374 40 40 import org.openstreetmap.josm.tools.ColorHelper; 41 41 import org.openstreetmap.josm.tools.Geometry; 42 import org.openstreetmap.josm.tools.JosmRuntimeException; 42 43 import org.openstreetmap.josm.tools.RightAndLefthandTraffic; 43 44 import org.openstreetmap.josm.tools.SubclassFilteredCollection; … … 97 98 parameterFunctions.add(Math.class.getMethod("tanh", double.class)); 98 99 } catch (NoSuchMethodException | SecurityException ex) { 99 throw new RuntimeException(ex); 100 throw new JosmRuntimeException(ex); 100 101 } 101 102 } … … 1240 1241 result = m.invoke(null, convertedArgs); 1241 1242 } catch (IllegalAccessException | IllegalArgumentException ex) { 1242 throw new RuntimeException(ex); 1243 throw new JosmRuntimeException(ex); 1243 1244 } catch (InvocationTargetException ex) { 1244 1245 Main.error(ex); … … 1306 1307 result = m.invoke(null, convertedArgs); 1307 1308 } catch (IllegalAccessException | IllegalArgumentException ex) { 1308 throw new RuntimeException(ex); 1309 throw new JosmRuntimeException(ex); 1309 1310 } catch (InvocationTargetException ex) { 1310 1311 Main.error(ex); -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj
r10837 r11374 40 40 import org.openstreetmap.josm.gui.mappaint.mapcss.Subpart; 41 41 import org.openstreetmap.josm.tools.ColorHelper; 42 import org.openstreetmap.josm.tools.JosmRuntimeException; 42 43 import org.openstreetmap.josm.tools.Pair; 43 44 import org.openstreetmap.josm.tools.Utils; … … 66 67 */ 67 68 public static enum LexicalState { 68 PREPROCESSOR(0), /* the preprocessor */ 69 DEFAULT(2); /* the main parser */ 70 69 /** the preprocessor */ 70 PREPROCESSOR(0), 71 /** the main parser */ 72 DEFAULT(2); 73 71 74 int idx; // the integer, which javacc assigns to this state 72 75 73 76 LexicalState(int idx) { 74 77 if (!this.name().equals(MapCSSParserTokenManager.lexStateNames[idx])) { 75 throw new RuntimeException(); 78 throw new JosmRuntimeException("Wrong name for index " + idx); 76 79 } 77 80 this.idx = idx; 78 81 } 79 } ;82 } 80 83 81 84 /** … … 95 98 scs = new SimpleCharStream(in, encoding, 1, 1); 96 99 } catch (java.io.UnsupportedEncodingException e) { 97 throw new RuntimeException(e); 100 throw new JosmRuntimeException(e); 98 101 } 99 102 return new MapCSSParserTokenManager(scs, initState.idx); -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java
r10837 r11374 60 60 import org.openstreetmap.josm.io.CachedFile; 61 61 import org.openstreetmap.josm.tools.CheckParameterUtil; 62 import org.openstreetmap.josm.tools.JosmRuntimeException; 62 63 import org.openstreetmap.josm.tools.LanguageInfo; 63 64 import org.openstreetmap.josm.tools.Utils; … … 108 109 SUPPORTED_KEYS.add((String) f.get(null)); 109 110 if (!f.getName().toLowerCase(Locale.ENGLISH).replace('_', '-').equals(f.get(null))) { 110 throw new RuntimeException(f.getName()); 111 throw new JosmRuntimeException(f.getName()); 111 112 } 112 113 } catch (IllegalArgumentException | IllegalAccessException ex) { 113 throw new RuntimeException(ex); 114 throw new JosmRuntimeException(ex); 114 115 } 115 116 } … … 468 469 break; 469 470 default: 470 final RuntimeException e = new RuntimeException(MessageFormat.format("Unknown MapCSS base selector {0}", base)); 471 final RuntimeException e = new JosmRuntimeException(MessageFormat.format("Unknown MapCSS base selector {0}", base)); 471 472 Main.warn(tr("Failed to parse Mappaint styles from ''{0}''. Error was: {1}", url, e.getMessage())); 472 473 Main.error(e); -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java
r11017 r11374 37 37 import org.openstreetmap.josm.gui.widgets.VerticallyScrollablePanel; 38 38 import org.openstreetmap.josm.tools.GBC; 39 import org.openstreetmap.josm.tools.JosmRuntimeException; 39 40 40 41 /** … … 479 480 // should have been set to Mercator at JOSM start. 480 481 if (pc == null) 481 throw new RuntimeException("Couldn't find the current projection in the list of available projections!"); 482 throw new JosmRuntimeException("Couldn't find the current projection in the list of available projections!"); 482 483 483 484 projectionCombo.addActionListener(e -> { -
trunk/src/org/openstreetmap/josm/gui/tagging/TagCellRenderer.java
r10378 r11374 12 12 import javax.swing.border.EmptyBorder; 13 13 import javax.swing.table.TableCellRenderer; 14 15 import org.openstreetmap.josm.tools.JosmRuntimeException; 14 16 15 17 /** … … 102 104 case 1: renderTagValue((TagModel) value); break; 103 105 104 default: throw new RuntimeException("unexpected index in switch statement"); 106 default: throw new JosmRuntimeException("unexpected index in switch statement"); 105 107 } 106 108 if (hasFocus && isSelected) { -
trunk/src/org/openstreetmap/josm/io/GpxWriter.java
r9231 r11374 27 27 import org.openstreetmap.josm.data.gpx.IWithAttributes; 28 28 import org.openstreetmap.josm.data.gpx.WayPoint; 29 import org.openstreetmap.josm.tools.JosmRuntimeException; 29 30 30 31 /** … … 291 292 break; 292 293 default: 293 throw new RuntimeException(tr("Unknown mode {0}.", mode)); 294 throw new JosmRuntimeException(tr("Unknown mode {0}.", mode)); 294 295 } 295 296 if (pnt != null) { -
trunk/src/org/openstreetmap/josm/io/NmeaReader.java
r10906 r11374 20 20 import org.openstreetmap.josm.data.gpx.ImmutableGpxTrack; 21 21 import org.openstreetmap.josm.data.gpx.WayPoint; 22 import org.openstreetmap.josm.tools.JosmRuntimeException; 22 23 import org.openstreetmap.josm.tools.date.DateUtils; 23 24 … … 116 117 } 117 118 if (d == null) 118 throw new RuntimeException("Date is malformed"); // malformed119 throw new JosmRuntimeException("Date is malformed"); 119 120 return d; 120 121 } -
trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java
r10627 r11374 22 22 import org.openstreetmap.josm.io.CachedFile; 23 23 import org.openstreetmap.josm.tools.HttpClient; 24 import org.openstreetmap.josm.tools.JosmRuntimeException; 24 25 import org.openstreetmap.josm.tools.LanguageInfo; 25 26 import org.openstreetmap.josm.tools.MultiMap; … … 273 274 switch (states.pop()) { 274 275 case INIT: 275 throw new RuntimeException("parsing error: more closing than opening elements"); 276 throw new JosmRuntimeException("parsing error: more closing than opening elements"); 276 277 case ENTRY: 277 278 if ("entry".equals(qName)) { -
trunk/src/org/openstreetmap/josm/io/session/SessionReader.java
r11043 r11374 43 43 import org.openstreetmap.josm.io.Compression; 44 44 import org.openstreetmap.josm.io.IllegalDataException; 45 import org.openstreetmap.josm.tools.JosmRuntimeException; 45 46 import org.openstreetmap.josm.tools.MultiMap; 46 47 import org.openstreetmap.josm.tools.Utils; … … 99 100 importer = importerClass.getConstructor().newInstance(); 100 101 } catch (ReflectiveOperationException e) { 101 throw new RuntimeException(e); 102 throw new JosmRuntimeException(e); 102 103 } 103 104 return importer; … … 574 575 }); 575 576 } catch (InvocationTargetException | InterruptedException ex) { 576 throw new RuntimeException(ex); 577 throw new JosmRuntimeException(ex); 577 578 } 578 579 } -
trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java
r10404 r11374 40 40 import org.openstreetmap.josm.gui.layer.geoimage.GeoImageLayer; 41 41 import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer; 42 import org.openstreetmap.josm.tools.JosmRuntimeException; 42 43 import org.openstreetmap.josm.tools.MultiMap; 43 44 import org.openstreetmap.josm.tools.Utils; … … 97 98 return exporterClass.getConstructor(layerClass).newInstance(layer); 98 99 } catch (ReflectiveOperationException e) { 99 throw new RuntimeException(e); 100 throw new JosmRuntimeException(e); 100 101 } 101 102 } … … 174 175 */ 175 176 public OutputStream getOutputStreamZip(String zipPath) throws IOException { 176 if (!isZip()) throw new RuntimeException(); 177 if (!isZip()) throw new JosmRuntimeException("not zip"); 177 178 ZipEntry entry = new ZipEntry(zipPath); 178 179 zipOut.putNextEntry(entry); … … 277 278 trans.transform(source, result); 278 279 } catch (TransformerException e) { 279 throw new RuntimeException(e); 280 throw new JosmRuntimeException(e); 280 281 } 281 282 } -
trunk/src/org/openstreetmap/josm/tools/FontsManager.java
r9639 r11374 41 41 ge.registerFont(Font.createFont(Font.TRUETYPE_FONT, i)); 42 42 } catch (IOException | FontFormatException ex) { 43 throw new RuntimeException(ex); 43 throw new JosmRuntimeException(ex); 44 44 } 45 45 } -
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r11021 r11374 637 637 if (!optional) { 638 638 String ext = name.indexOf('.') != -1 ? "" : ".???"; 639 throw new RuntimeException( 639 throw new JosmRuntimeException( 640 640 tr("Fatal: failed to locate image ''{0}''. This is a serious configuration problem. JOSM will stop working.", 641 641 name + ext)); -
trunk/src/org/openstreetmap/josm/tools/RightAndLefthandTraffic.java
r11264 r11374 158 158 w.footer(); 159 159 } catch (IOException ex) { 160 throw new RuntimeException(ex); 160 throw new JosmRuntimeException(ex); 161 161 } 162 162 } -
trunk/src/org/openstreetmap/josm/tools/Territories.java
r11362 r11374 104 104 } 105 105 } catch (IOException | IllegalDataException ex) { 106 throw new RuntimeException(ex); 106 throw new JosmRuntimeException(ex); 107 107 } 108 108 } -
trunk/src/org/openstreetmap/josm/tools/Utils.java
r11330 r11374 556 556 md = MessageDigest.getInstance("MD5"); 557 557 } catch (NoSuchAlgorithmException e) { 558 throw new RuntimeException(e); 558 throw new JosmRuntimeException(e); 559 559 } 560 560 byte[] byteData = data.getBytes(StandardCharsets.UTF_8); … … 621 621 } 622 622 } 623 if (parentless == null) throw new RuntimeException(); 623 if (parentless == null) throw new JosmRuntimeException("parentless"); 624 624 sorted.add(parentless); 625 625 deps.remove(parentless); … … 628 628 } 629 629 } 630 if (sorted.size() != size) throw new RuntimeException(); 630 if (sorted.size() != size) throw new JosmRuntimeException("Wrong size"); 631 631 return sorted; 632 632 } -
trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java
r10627 r11374 258 258 return this; 259 259 } catch (ParserConfigurationException e) { 260 // This should never happen ;-) 261 throw new RuntimeException(e); 260 throw new JosmRuntimeException(e); 262 261 } 263 262 }
Note:
See TracChangeset
for help on using the changeset viewer.