Changeset 10627 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2016-07-24T14:48:47+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/tools
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/AudioUtil.java
r9144 r10627 41 41 return naturalLength / calibration; 42 42 } catch (UnsupportedAudioFileException | IOException e) { 43 if (Main.isDebugEnabled()) { 44 Main.debug(e.getMessage()); 45 } 43 Main.debug(e); 46 44 return 0.0; 47 45 } -
trunk/src/org/openstreetmap/josm/tools/Geometry.java
r10378 r10627 911 911 innerRings = MultipolygonBuilder.joinWays(mpm.inners); 912 912 } catch (MultipolygonBuilder.JoinedPolygonCreationException ex) { 913 Main.trace(ex); 913 914 Main.debug("Invalid multipolygon " + multiPolygon); 914 915 return false; -
trunk/src/org/openstreetmap/josm/tools/I18n.java
r10626 r10627 642 642 } 643 643 } catch (IOException e) { 644 Main.trace(e); 644 645 return false; 645 646 } -
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r10616 r10627 959 959 img = read(Utils.fileToURL(cf.getFile()), false, false); 960 960 } catch (IOException e) { 961 Main.warn("IOException while reading HTTP image: "+e.getMessage());961 Main.warn(e, "IOException while reading HTTP image:"); 962 962 } 963 963 return img == null ? null : new ImageResource(img); … … 966 966 } 967 967 } catch (IOException e) { 968 Main.debug(e); 968 969 return null; 969 970 } finally { … … 990 991 bytes = Utils.decodeUrl(data).getBytes(StandardCharsets.UTF_8); 991 992 } catch (IllegalArgumentException ex) { 992 Main.warn("Unable to decode URL data part: "+ex.getMessage() + " (" + data + ')'); 993 Main.warn(ex, "Unable to decode URL data part: "+ex.getMessage() + " (" + data + ')'); 993 994 return null; 994 995 } … … 1017 1018 return img == null ? null : new ImageResource(img); 1018 1019 } catch (IOException e) { 1019 Main.warn("IOException while reading image: "+e.getMessage());1020 Main.warn(e, "IOException while reading image:"); 1020 1021 } 1021 1022 } … … 1111 1112 } 1112 1113 } catch (IOException e) { 1113 Main.warn(tr("Failed to handle zip file ''{0}''. Exception was: {1}", archive.getName(), e.toString())); 1114 Main.warn(e, tr("Failed to handle zip file ''{0}''. Exception was: {1}", archive.getName(), e.toString())); 1114 1115 } 1115 1116 return null; … … 1182 1183 return u; 1183 1184 } catch (SecurityException e) { 1184 Main.warn(tr( 1185 Main.warn(e, tr( 1185 1186 "Failed to access directory ''{0}'' for security reasons. Exception was: {1}", 1186 1187 name, e.toString())); … … 1197 1198 return u; 1198 1199 } catch (SecurityException e) { 1199 Main.warn(tr( 1200 Main.warn(e, tr( 1200 1201 "Failed to access directory ''{0}'' for security reasons. Exception was: {1}", dir, e 1201 1202 .toString())); … … 1271 1272 cf.close(); 1272 1273 } catch (SAXReturnException r) { 1274 Main.trace(r); 1273 1275 return r.getResult(); 1274 1276 } catch (IOException | SAXException e) { … … 1545 1547 } 1546 1548 } catch (SVGException ex) { 1547 Main.error("Unable to load svg: {0}", ex.getMessage());1549 Main.error(ex, "Unable to load svg:"); 1548 1550 return null; 1549 1551 } -
trunk/src/org/openstreetmap/josm/tools/OpenBrowser.java
r10212 r10627 59 59 // Workaround for KDE (Desktop API is severely flawed) 60 60 // see https://bugs.openjdk.java.net/browse/JDK-6486393 61 Main.warn("Desktop class failed. Platform dependent fall back for open url in browser."); 61 Main.warn(e, "Desktop class failed. Platform dependent fall back for open url in browser."); 62 62 displayUrlFallback(uri); 63 63 } … … 72 72 displayUrlFallback(uri); 73 73 } catch (IOException e) { 74 Main.debug(e); 74 75 return e.getMessage(); 75 76 } … … 90 91 return displayUrl(new URI(url)); 91 92 } catch (URISyntaxException e) { 93 Main.debug(e); 92 94 return e.getMessage(); 93 95 } -
trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java
r10580 r10627 67 67 enableOSXFullscreen((Window) Main.parent); 68 68 } catch (IllegalAccessException e) { 69 Main.debug(e); 69 70 // with Java 9, module java.desktop does not export com.apple.eawt, use new Desktop API instead 70 71 setHandlers(Desktop.class, quitHandler, aboutHandler, openFilesHandler, preferencesHandler, proxy, Desktop.getDesktop()); … … 89 90 return Class.forName("com.apple.eawt."+className); 90 91 } catch (ClassNotFoundException e) { 92 Main.trace(e); 91 93 return Class.forName("java.awt.desktop."+className); 92 94 } … … 148 150 args[1].getClass().getDeclaredMethod(closed ? "performQuit" : "cancelQuit").invoke(args[1]); 149 151 } catch (IllegalAccessException e) { 152 Main.debug(e); 150 153 // with Java 9, module java.desktop does not export com.apple.eawt, use new Desktop API instead 151 154 Class.forName("java.awt.desktop.QuitResponse").getMethod(closed ? "performQuit" : "cancelQuit").invoke(args[1]); -
trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
r10626 r10627 192 192 return "Debian".equalsIgnoreCase(dist) || "Ubuntu".equalsIgnoreCase(dist) || "Mint".equalsIgnoreCase(dist); 193 193 } catch (IOException e) { 194 if (Main.isDebugEnabled()) { 195 // lsb_release is not available on all Linux systems, so don't log at warning level 196 Main.debug(e.getMessage()); 197 } 194 // lsb_release is not available on all Linux systems, so don't log at warning level 195 Main.debug(e); 198 196 return false; 199 197 } … … 303 301 } 304 302 } catch (IOException e) { 303 Main.debug(e); 305 304 // Non LSB-compliant Linux system. List of common fallback release files: http://linuxmafia.com/faq/Admin/release-files.html 306 305 for (LinuxReleaseInfo info : new LinuxReleaseInfo[]{ -
trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java
r10626 r10627 268 268 ks.deleteEntry(alias); 269 269 } catch (KeyStoreException e) { 270 Main.error(tr("Unable to remove insecure certificate from keystore: {0}", e.getMessage())); 270 Main.error(e, tr("Unable to remove insecure certificate from keystore: {0}", e.getMessage())); 271 271 } 272 272 } -
trunk/src/org/openstreetmap/josm/tools/Utils.java
r10616 r10627 1326 1326 return true; 1327 1327 } catch (MalformedURLException | NullPointerException e) { 1328 Main.trace(e); 1328 1329 return false; 1329 1330 } -
trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java
r10384 r10627 89 89 initFromPreferences(preferenceKey); 90 90 } catch (WindowGeometryException e) { 91 if (Main.isDebugEnabled()) { 92 Main.debug(e.getMessage()); 93 } 91 Main.debug(e); 94 92 initFromWindowGeometry(defaultGeometry); 95 93 } -
trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java
r10378 r10627 204 204 return f; 205 205 } catch (NoSuchFieldException ex) { 206 Main.trace(ex); 206 207 fields.put(s, null); 207 208 return null; … … 251 252 } catch (SAXException e) { 252 253 // Exception very unlikely to happen, so no need to translate this 253 Main.error("Cannot disable 'load-external-dtd' feature: "+e.getMessage());254 Main.error(e, "Cannot disable 'load-external-dtd' feature:"); 254 255 } 255 256 reader.parse(new InputSource(in));
Note:
See TracChangeset
for help on using the changeset viewer.