Changeset 11374 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2016-12-09T23:31:13+01:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
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) {
Note:
See TracChangeset
for help on using the changeset viewer.