Changeset 10212 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2016-05-15T00:51:10+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/tools
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java
r9814 r10212 207 207 audioPlayer = new AudioPlayer(); 208 208 return audioPlayer; 209 } catch (Exception ex) { 209 } catch (RuntimeException ex) { 210 210 Main.error(ex); 211 211 return null; … … 249 249 AudioInputStream audioInputStream = null; 250 250 SourceDataLine audioOutputLine = null; 251 AudioFormat audioFormat = null;251 AudioFormat audioFormat; 252 252 byte[] abData = new byte[(int) chunk]; 253 253 … … 266 266 command.possiblyInterrupt(); 267 267 for (;;) { 268 int nBytesRead = 0;268 int nBytesRead; 269 269 nBytesRead = audioInputStream.read(abData, 0, abData.length); 270 270 position += nBytesRead / bytesPerSecond; … … 362 362 command.failed(startPlayingException); // sets state 363 363 } 364 } catch (Exception e) { 364 } catch (IOException e) { 365 365 state = State.NOTPLAYING; 366 Main.error(e); 366 367 } 367 368 } -
trunk/src/org/openstreetmap/josm/tools/ExifReader.java
r9970 r10212 78 78 return date; 79 79 } 80 } catch (Exception e) { 80 } catch (UncheckedParseException | JpegProcessingException | IOException e) { 81 81 Main.error(e); 82 82 } -
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r10179 r10212 83 83 84 84 import com.kitfox.svg.SVGDiagram; 85 import com.kitfox.svg.SVGException; 85 86 import com.kitfox.svg.SVGUniverse; 86 87 … … 986 987 } 987 988 } 988 } catch (Exception e) { 989 } catch (IOException e) { 989 990 Main.warn(tr("Failed to handle zip file ''{0}''. Exception was: {1}", archive.getName(), e.toString())); 990 991 } … … 1153 1154 } catch (SAXReturnException r) { 1154 1155 return r.getResult(); 1155 } catch (Exception e) { 1156 } catch (IOException | SAXException e) { 1156 1157 Main.warn("Parsing " + base + fn + " failed:\n" + e); 1157 1158 return null; … … 1427 1428 svg.render(g); 1428 1429 } 1429 } catch (Exception ex) { 1430 } catch (SVGException ex) { 1430 1431 Main.error("Unable to load svg: {0}", ex.getMessage()); 1431 1432 return null; -
trunk/src/org/openstreetmap/josm/tools/OpenBrowser.java
r8540 r10212 7 7 import java.io.IOException; 8 8 import java.net.URI; 9 import java.net.URISyntaxException; 9 10 10 11 import org.openstreetmap.josm.Main; … … 62 63 } 63 64 } 64 } catch (Exception e) { 65 } catch (IOException e) { 65 66 Main.warn(e); 66 67 return e.getMessage(); … … 88 89 try { 89 90 return displayUrl(new URI(url)); 90 } catch (Exception e) { 91 } catch (URISyntaxException e) { 91 92 return e.getMessage(); 92 93 } -
trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java
r10208 r10212 8 8 import java.io.Reader; 9 9 import java.lang.reflect.Field; 10 import java.lang.reflect.InvocationTargetException; 10 11 import java.lang.reflect.Method; 11 12 import java.lang.reflect.Modifier; … … 156 157 } 157 158 } 158 } catch (Exception e) { 159 } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { 159 160 Main.error(e); // SAXException does not dump inner exceptions. 160 161 throwException(e); -
trunk/src/org/openstreetmap/josm/tools/bugreport/BugReportExceptionHandler.java
r10067 r10212 144 144 JPanel p = buildPanel(e); 145 145 JOptionPane.showMessageDialog(Main.parent, p, tr("You have encountered a bug in JOSM"), JOptionPane.ERROR_MESSAGE); 146 } catch (Exception ex) { 146 } catch (RuntimeException ex) { 147 147 Main.error(ex); 148 148 } -
trunk/src/org/openstreetmap/josm/tools/date/DateUtils.java
r10133 r10212 136 136 try { 137 137 return XML_DATE.newXMLGregorianCalendar(str).toGregorianCalendar().getTimeInMillis(); 138 } catch (Exception ex) { 138 } catch (IllegalArgumentException ex) { 139 139 throw new UncheckedParseException("The date string (" + str + ") could not be parsed.", ex); 140 140 }
Note:
See TracChangeset
for help on using the changeset viewer.