- Timestamp:
- 2016-07-24T14:48:47+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 67 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java
r10469 r10627 128 128 } catch (IOException e) { 129 129 LOG.log(Level.WARNING, "JCS TMS - error loading from cache for tile {0}: {1}", new Object[] {tile.getKey(), e.getMessage()}); 130 Main.warn(e); 130 131 } 131 132 } … … 296 297 } catch (IOException e) { 297 298 LOG.log(Level.WARNING, "JCS TMS - error loading object for tile {0}: {1}", new Object[] {tile.getKey(), e.getMessage()}); 299 Main.warn(e); 298 300 return null; 299 301 } -
trunk/src/org/openstreetmap/josm/data/osm/DatasetConsistencyTest.java
r10378 r10627 215 215 writer.println("Exception during dataset integrity test:"); 216 216 e.printStackTrace(writer); 217 Main.warn(e); 217 218 } 218 219 } -
trunk/src/org/openstreetmap/josm/gui/GettingStarted.java
r10620 r10627 145 145 ProxyPreference.removeProxyPreferenceListener(GettingStarted.this); 146 146 } catch (IOException ex) { 147 Main.warn( tr("Failed to read MOTD. Exception was: {0}", ex.toString()));147 Main.warn(ex, tr("Failed to read MOTD. Exception was: {0}", ex.toString())); 148 148 content = "<html>" + STYLE + "<h1>" + "JOSM - " + tr("Java OpenStreetMap Editor") 149 149 + "</h1>\n<h2 align=\"center\">(" + tr("Message of the day not available") + ")</h2></html>"; -
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r10611 r10627 536 536 Main.setOffline(OnlineResource.valueOf(s.toUpperCase(Locale.ENGLISH))); 537 537 } catch (IllegalArgumentException e) { 538 Main.error( tr("''{0}'' is not a valid value for argument ''{1}''. Possible values are {2}, possibly delimited by commas.",538 Main.error(e, tr("''{0}'' is not a valid value for argument ''{1}''. Possible values are {2}, possibly delimited by commas.", 539 539 s.toUpperCase(Locale.ENGLISH), Option.OFFLINE.getName(), Arrays.toString(OnlineResource.values()))); 540 540 System.exit(1); -
trunk/src/org/openstreetmap/josm/gui/MapView.java
r10611 r10627 361 361 } catch (IllegalArgumentException e) { 362 362 // Ignored in old implementation 363 if (Main.isDebugEnabled()) { 364 Main.debug(e.getMessage()); 365 } 363 Main.debug(e); 366 364 } 367 365 try { … … 369 367 } catch (IllegalArgumentException e) { 370 368 // Ignored in old implementation 371 if (Main.isDebugEnabled()) { 372 Main.debug(e.getMessage()); 373 } 369 Main.debug(e); 374 370 } 375 371 } … … 389 385 } catch (IllegalArgumentException e) { 390 386 // Ignored in old implementation 391 if (Main.isDebugEnabled()) { 392 Main.debug(e.getMessage()); 393 } 387 Main.debug(e); 394 388 } 395 389 } -
trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java
r10611 r10627 75 75 } 76 76 } catch (IllegalArgumentException ex) { 77 Main.warn(ex); 77 78 if (ex.getMessage() != null && !ex.getMessage().isEmpty()) { 78 79 JOptionPane.showMessageDialog(Main.parent, -
trunk/src/org/openstreetmap/josm/gui/dialogs/FilterTableModel.java
r10446 r10627 64 64 filterMatcher.add(filter); 65 65 } catch (ParseError e) { 66 Main.error(e); 66 67 JOptionPane.showMessageDialog( 67 68 Main.parent, -
trunk/src/org/openstreetmap/josm/gui/dialogs/LatLonDialog.java
r10611 r10627 236 236 } 237 237 } catch (IllegalArgumentException e) { 238 Main.trace(e); 238 239 latLon = null; 239 240 } … … 254 255 en = parseEastNorth(tfEastNorth.getText()); 255 256 } catch (IllegalArgumentException e) { 257 Main.trace(e); 256 258 en = null; 257 259 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java
r10611 r10627 656 656 } 657 657 } catch (IOException ex) { 658 Main.error(ex); 658 659 txtSource.append("<ERROR: failed to read file!>"); 659 660 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
r10611 r10627 110 110 } catch (IllegalArgumentException e) { 111 111 // Legacy settings 112 Main.trace(e); 112 113 return Boolean.parseBoolean(s) ? ButtonHidingType.DYNAMIC : ButtonHidingType.ALWAYS_SHOWN; 113 114 } … … 699 700 new WindowGeometry(preferencePrefix+".geometry").applySafe(this); 700 701 } catch (WindowGeometryException e) { 702 Main.debug(e); 701 703 ToggleDialog.this.setPreferredSize(ToggleDialog.this.getDefaultDetachedSize()); 702 704 pack(); -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManager.java
r10611 r10627 393 393 } 394 394 } catch (IllegalStateException e) { 395 Main.error(e); 395 396 JOptionPane.showMessageDialog(parent, e.getMessage(), tr("Error"), JOptionPane.ERROR_MESSAGE); 396 397 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/BasicChangesetQueryPanel.java
r10378 r10627 195 195 q = BasicQuery.valueOf(BasicQuery.class, value); 196 196 } catch (IllegalArgumentException e) { 197 Main.warn( tr("Unexpected value for preference ''{0}'', got ''{1}''. Resetting to default query.",197 Main.warn(e, tr("Unexpected value for preference ''{0}'', got ''{1}''. Resetting to default query.", 198 198 "changeset-query.basic.query", value)); 199 199 q = BasicQuery.MOST_RECENT_CHANGESETS; -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/ChangesetQueryDialog.java
r10479 r10627 23 23 import javax.swing.KeyStroke; 24 24 25 import org.openstreetmap.josm.Main; 25 26 import org.openstreetmap.josm.gui.HelpAwareOptionPane; 26 27 import org.openstreetmap.josm.gui.help.ContextSensitiveHelpAction; … … 192 193 setVisible(false); 193 194 } catch (IllegalStateException e) { 195 Main.error(e); 194 196 JOptionPane.showMessageDialog(ChangesetQueryDialog.this, e.getMessage(), tr("Error"), JOptionPane.ERROR_MESSAGE); 195 197 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/UrlBasedQueryPanel.java
r10611 r10627 134 134 return ChangesetQuery.buildFromUrlQuery(url.getQuery()); 135 135 } catch (ChangesetQueryUrlException e) { 136 Main.warn(e .getMessage());136 Main.warn(e); 137 137 return null; 138 138 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
r10611 r10627 935 935 return modified ? new ChangeCommand(orig, relation) : null; 936 936 } catch (AddAbortException ign) { 937 Main.trace(ign); 937 938 return null; 938 939 } -
trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java
r10212 r10627 148 148 bookmarks.add(new Bookmark(entry)); 149 149 } catch (IllegalArgumentException e) { 150 Main.error( tr("Error reading bookmark entry: %s", e.getMessage()));150 Main.error(e, tr("Error reading bookmark entry: %s", e.getMessage())); 151 151 } 152 152 } -
trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java
r10611 r10627 138 138 tpDownloadAreaSelectors.setSelectedIndex(Main.pref.getInteger("download.tab", 0)); 139 139 } catch (IndexOutOfBoundsException ex) { 140 Main.trace(ex); 140 141 Main.pref.putInteger("download.tab", 0); 141 142 } -
trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java
r10611 r10627 301 301 content = reader.fetchHelpTopicContent(url, true); 302 302 } catch (MissingHelpContentException e) { 303 Main.trace(e); 303 304 url = getHelpTopicUrl(buildAbsoluteHelpTopic(relativeHelpTopic, LocaleType.BASELANGUAGE)); 304 305 try { 305 306 content = reader.fetchHelpTopicContent(url, true); 306 307 } catch (MissingHelpContentException e1) { 308 Main.trace(e1); 307 309 url = getHelpTopicUrl(buildAbsoluteHelpTopic(relativeHelpTopic, LocaleType.ENGLISH)); 308 310 try { 309 311 content = reader.fetchHelpTopicContent(url, true); 310 312 } catch (MissingHelpContentException e2) { 313 Main.debug(e2); 311 314 this.url = url; 312 315 handleMissingHelpContent(relativeHelpTopic); … … 344 347 content = reader.fetchHelpTopicContent(url, true); 345 348 } catch (MissingHelpContentException e) { 349 Main.debug(e); 346 350 this.url = url; 347 351 handleMissingHelpContent(absoluteHelpTopic); -
trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java
r10413 r10627 144 144 HistoryOsmPrimitive.forOsmPrimitive(primitive); 145 145 } catch (IllegalArgumentException ign) { 146 Main.trace(ign); 146 147 return false; 147 148 } -
trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java
r10179 r10627 110 110 setAlwaysOnTop(true); 111 111 } catch (SecurityException e) { 112 Main.warn( tr("Failed to put Credential Dialog always on top. Caught security exception."));112 Main.warn(e, tr("Failed to put Credential Dialog always on top. Caught security exception.")); 113 113 } 114 114 build(); -
trunk/src/org/openstreetmap/josm/gui/io/DownloadOpenChangesetsTask.java
r10611 r10627 110 110 im.setPartiallyIdentified(im.getUserName()); 111 111 } 112 Main.warn( tr("Failed to retrieve user infos for the current JOSM user. Exception was: {0}", e.toString()));112 Main.warn(e, tr("Failed to retrieve user infos for the current JOSM user. Exception was: {0}", e.toString())); 113 113 } 114 114 } -
trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java
r10611 r10627 493 493 currentFuture.get(); 494 494 } catch (CancellationException e) { 495 Main.trace(e); 495 496 model.setUploadState(layer, UploadOrSaveState.CANCELED); 496 497 } catch (InterruptedException | ExecutionException e) { … … 534 535 currentFuture.get(); 535 536 } catch (CancellationException e) { 537 Main.trace(e); 536 538 model.setSaveState(layerInfo.getLayer(), UploadOrSaveState.CANCELED); 537 539 } catch (InterruptedException | ExecutionException e) { -
trunk/src/org/openstreetmap/josm/gui/io/UploadPrimitivesTask.java
r10611 r10627 228 228 SwingUtilities.invokeAndWait(r); 229 229 } catch (InterruptedException e) { 230 Main.trace(e); 230 231 lastException = e; 231 232 } catch (InvocationTargetException e) { 233 Main.trace(e); 232 234 lastException = new OsmTransferException(e.getCause()); 233 235 } -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
r10619 r10627 942 942 sldSeconds.setValue((int) (deciSeconds % 60)); 943 943 } catch (RuntimeException e) { 944 Main.warn(e); 944 945 JOptionPane.showMessageDialog(Main.parent, 945 946 tr("An error occurred while trying to match the photos to the GPX track." -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
r10611 r10627 183 183 addRecursiveFiles(files, selection); 184 184 } catch (IllegalStateException e) { 185 Main.debug(e); 185 186 rememberError(e.getMessage()); 186 187 } -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java
r10611 r10627 152 152 return new TemplateParser(s).parse(); 153 153 } catch (ParseError e) { 154 Main.debug(e); 154 155 Main.warn("Unable to parse template engine pattern ''{0}'' for property {1}. Using default (''{2}'') instead", 155 156 s, getKey(), super.getDefaultValueAsString()); -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
r10611 r10627 261 261 return new Color(r, g, b); 262 262 } catch (IllegalArgumentException e) { 263 Main.trace(e); 263 264 return null; 264 265 } … … 279 280 return new Color(r, g, b, alpha); 280 281 } catch (IllegalArgumentException e) { 282 Main.trace(e); 281 283 return null; 282 284 } … … 294 296 return Color.getHSBColor(h, s, b); 295 297 } catch (IllegalArgumentException e) { 298 Main.trace(e); 296 299 return null; 297 300 } … … 628 631 return RotationAngle.parseCardinalRotation(cardinal); 629 632 } catch (IllegalArgumentException ignore) { 633 Main.trace(ignore); 630 634 return null; 631 635 } … … 668 672 m = SearchCompiler.compile(searchStr); 669 673 } catch (ParseError ex) { 674 Main.trace(ex); 670 675 return null; 671 676 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
r10300 r10627 331 331 }; 332 332 } catch (NoSuchElementException ignore) { 333 Main.trace(ignore); 333 334 containsFinder = new ContainsFinder(e); 334 335 } … … 468 469 if (!c.applies(env)) return false; 469 470 } catch (PatternSyntaxException e) { 470 Main.error( "PatternSyntaxException while applying condition" + c +": "+e.getMessage());471 Main.error(e, "PatternSyntaxException while applying condition" + c + ':'); 471 472 return false; 472 473 } -
trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java
r10378 r10627 343 343 userName)); 344 344 } catch (OsmOAuthAuthorizationException e) { 345 Main.debug(e); 345 346 throw new OsmLoginFailedException(e.getCause()); 346 347 } catch (IOException e) { -
trunk/src/org/openstreetmap/josm/gui/oauth/RetrieveAccessTokenTask.java
r10611 r10627 87 87 accessToken = client.getAccessToken(getProgressMonitor().createSubTaskMonitor(0, false)); 88 88 } catch (OsmTransferCanceledException e) { 89 Main.trace(e); 89 90 return; 90 91 } catch (final OsmOAuthAuthorizationException e) { -
trunk/src/org/openstreetmap/josm/gui/oauth/RetrieveRequestTokenTask.java
r10611 r10627 81 81 requestToken = client.getRequestToken(getProgressMonitor().createSubTaskMonitor(0, false)); 82 82 } catch (OsmTransferCanceledException e) { 83 Main.trace(e); 83 84 return; 84 85 } catch (final OsmOAuthAuthorizationException e) { -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java
r10619 r10627 338 338 Main.pref.save(); 339 339 } catch (IOException e) { 340 Main.warn( "IOException while saving preferences: "+e.getMessage());340 Main.warn(e, "IOException while saving preferences:"); 341 341 } 342 342 readPreferences(Main.pref); -
trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java
r10611 r10627 453 453 parser.parse(); 454 454 } catch (ParseError e) { 455 Main.warn(e); 455 456 JOptionPane.showMessageDialog(Main.parent, 456 457 tr("Incorrect waypoint label pattern: {0}", e.getMessage()), tr("Incorrect pattern"), JOptionPane.ERROR_MESSAGE); … … 462 463 parser.parse(); 463 464 } catch (ParseError e) { 465 Main.warn(e); 464 466 JOptionPane.showMessageDialog(Main.parent, 465 467 tr("Incorrect audio waypoint label pattern: {0}", e.getMessage()), tr("Incorrect pattern"), JOptionPane.ERROR_MESSAGE); -
trunk/src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java
r10212 r10627 86 86 } catch (ReflectiveOperationException ex) { 87 87 // just debug, Quaqua may not even be installed... 88 Main.debug(ex .getMessage());88 Main.debug(ex); 89 89 } 90 90 } -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java
r10611 r10627 764 764 htmlPane = new JosmEditorPane(url); 765 765 } catch (IOException e1) { 766 Main.trace(e1); 766 767 // give a second chance with a default Locale 'en' 767 768 try { … … 769 770 htmlPane = new JosmEditorPane(url); 770 771 } catch (IOException e2) { 772 Main.debug(e2); 771 773 JOptionPane.showMessageDialog(gui, tr("EULA license URL not available: {0}", eulaUrl)); 772 774 return false; -
trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java
r10626 r10627 57 57 canLoad = true; 58 58 } catch (IOException e) { 59 Main.warn( tr("Could not read tagging preset source: {0}", source));59 Main.warn(e, tr("Could not read tagging preset source: {0}", source)); 60 60 ExtendedDialog ed = new ExtendedDialog(Main.parent, tr("Error"), 61 61 new String[] {tr("Yes"), tr("No"), tr("Cancel")}); … … 82 82 // Should not happen, but at least show message 83 83 String msg = tr("Could not read tagging preset source {0}", source); 84 Main.error( msg);84 Main.error(e, msg); 85 85 JOptionPane.showMessageDialog(Main.parent, msg); 86 86 return false; … … 95 95 source, e.getLineNumber(), e.getColumnNumber(), e.getMessage()); 96 96 } 97 Main.warn(e, errorMessage); 97 98 } catch (SAXException e) { 98 99 if (canLoad) { … … 105 106 source, e.getMessage()); 106 107 } 108 Main.warn(e, errorMessage); 107 109 } 108 110 -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/CustomProjectionChoice.java
r10611 r10627 97 97 test.update(input.getText()); 98 98 } catch (ProjectionConfigurationException ex) { 99 Main.warn(ex); 99 100 error = ex.getMessage(); 100 101 valStatus.setIcon(ImageProvider.get("data", "error")); -
trunk/src/org/openstreetmap/josm/gui/preferences/server/ApiUrlTestTask.java
r10173 r10627 191 191 Capabilities.CapabilitiesParser.parse(new InputSource(connection.getResponse().getContent())); 192 192 } catch (SAXException | ParserConfigurationException e) { 193 Main.warn(e .getMessage());193 Main.warn(e); 194 194 alertInvalidCapabilities(); 195 195 return; -
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionManager.java
r10611 r10627 222 222 PRESET_TAG_CACHE.putAll(ki.key, ki.getValues()); 223 223 } catch (NullPointerException e) { 224 Main.error( p + ": Unable to cache " + ki);224 Main.error(e, p + ": Unable to cache " + ki); 225 225 } 226 226 } -
trunk/src/org/openstreetmap/josm/gui/widgets/JosmPasswordField.java
r8419 r10627 126 126 pasteAction.actionPerformed(e); 127 127 } catch (NullPointerException npe) { 128 Main.error( "NullPointerException occured because of JDK bug 6322854. "128 Main.error(npe, "NullPointerException occured because of JDK bug 6322854. " 129 129 +"Copy/Paste operation has not been performed. Please complain to Oracle: "+ 130 130 "https://bugs.openjdk.java.net/browse/JDK-6322854"); -
trunk/src/org/openstreetmap/josm/gui/widgets/OsmIdTextField.java
r8496 r10627 10 10 import javax.swing.text.JTextComponent; 11 11 12 import org.openstreetmap.josm.Main; 12 13 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; 13 14 import org.openstreetmap.josm.data.osm.PrimitiveId; … … 110 111 } catch (IllegalArgumentException ex) { 111 112 try { 113 Main.trace(ex); 112 114 long id = Long.parseLong(s); 113 115 if (id <= 0) { … … 123 125 } 124 126 } catch (IllegalArgumentException ex2) { 127 Main.trace(ex2); 125 128 return false; 126 129 } -
trunk/src/org/openstreetmap/josm/io/CacheCustomContent.java
r8926 r10627 97 97 return false; 98 98 } catch (OfflineAccessException e) { 99 Main.trace(e); 99 100 return true; 100 101 } … … 185 186 } 186 187 } catch (IOException e) { 188 Main.trace(e); 187 189 if (!isOffline()) { 188 190 this.data = updateForce(); -
trunk/src/org/openstreetmap/josm/io/CachedFile.java
r10212 r10627 354 354 } catch (IOException e) { 355 355 if (file.getName().endsWith(".zip")) { 356 Main.warn( tr("Failed to open file with extension ''{2}'' and namepart ''{3}'' in zip file ''{0}''. Exception was: {1}",356 Main.warn(e, tr("Failed to open file with extension ''{2}'' and namepart ''{3}'' in zip file ''{0}''. Exception was: {1}", 357 357 file.getName(), e.toString(), extension, namepart)); 358 358 } … … 425 425 checkOfflineAccess(urlStr); 426 426 } catch (OfflineAccessException e) { 427 Main.trace(e); 427 428 offline = true; 428 429 } -
trunk/src/org/openstreetmap/josm/io/MessageNotifier.java
r10615 r10627 147 147 } 148 148 } catch (CredentialsAgentException e) { 149 Main.warn( "Unable to get credentials: "+e.getMessage());149 Main.warn(e, "Unable to get credentials:"); 150 150 } 151 151 } -
trunk/src/org/openstreetmap/josm/io/NmeaReader.java
r10475 r10627 440 440 } catch (RuntimeException x) { 441 441 // out of bounds and such 442 Main.debug(x); 442 443 ps.malformed++; 443 444 ps.pWp = null; -
trunk/src/org/openstreetmap/josm/io/OsmApi.java
r10436 r10627 212 212 initializeCapabilities(cache.updateIfRequiredString()); 213 213 } catch (SAXParseException parseException) { 214 Main.trace(parseException); 214 215 // XML parsing may fail if JOSM previously stored a corrupted capabilities document (see #8278) 215 216 // In that case, force update and try again -
trunk/src/org/openstreetmap/josm/io/OsmReader.java
r10615 r10627 528 528 } catch (IllegalStateException e) { 529 529 // thrown for positive changeset id on new primitives 530 Main.debug(e); 530 531 Main.info(e.getMessage()); 531 532 current.setChangesetId(0); -
trunk/src/org/openstreetmap/josm/io/auth/CredentialsManager.java
r10600 r10627 7 7 import java.util.Objects; 8 8 9 import org.openstreetmap.josm.Main; 9 10 import org.openstreetmap.josm.data.oauth.OAuthToken; 10 11 import org.openstreetmap.josm.gui.JosmUserIdentityManager; … … 103 104 } 104 105 } catch (CredentialsAgentException ex) { 106 Main.debug(ex); 105 107 return null; 106 108 } -
trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java
r10217 r10627 203 203 atts.getValue("max-lon"), ","); 204 204 } catch (IllegalArgumentException e) { 205 Main.trace(e); 205 206 break; 206 207 } … … 235 236 shape.addPoint(atts.getValue("lat"), atts.getValue("lon")); 236 237 } catch (IllegalArgumentException e) { 238 Main.trace(e); 237 239 break; 238 240 } -
trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpServer.java
r10212 r10627 37 37 instance4.start(); 38 38 } catch (IOException ex) { 39 Main.debug(ex); 39 40 Main.warn(marktr("Cannot start IPv4 remotecontrol server on port {0}: {1}"), 40 41 Integer.toString(port), ex.getLocalizedMessage()); … … 46 47 /* only show error when we also have no IPv4 */ 47 48 if (instance4 == null) { 49 Main.debug(ex); 48 50 Main.warn(marktr("Cannot start IPv6 remotecontrol server on port {0}: {1}"), 49 51 Integer.toString(port), ex.getLocalizedMessage()); -
trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java
r10580 r10627 318 318 instance4.start(); 319 319 } catch (IOException | GeneralSecurityException ex) { 320 Main.debug(ex); 320 321 Main.warn(marktr("Cannot start IPv4 remotecontrol https server on port {0}: {1}"), 321 322 Integer.toString(port), ex.getLocalizedMessage()); … … 327 328 /* only show error when we also have no IPv4 */ 328 329 if (instance4 == null) { 330 Main.debug(ex); 329 331 Main.warn(marktr("Cannot start IPv6 remotecontrol https server on port {0}: {1}"), 330 332 Integer.toString(port), ex.getLocalizedMessage()); -
trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java
r10587 r10627 241 241 out.flush(); 242 242 } catch (RequestHandlerErrorException ex) { 243 Main.debug(ex); 243 244 sendError(out); 244 245 } catch (RequestHandlerBadRequestException ex) { 246 Main.debug(ex); 245 247 sendBadRequest(out, ex.getMessage()); 246 248 } catch (RequestHandlerForbiddenException ex) { 249 Main.debug(ex); 247 250 sendForbidden(out, ex.getMessage()); 248 251 } -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadObjectHandler.java
r10615 r10627 101 101 ps.add(SimplePrimitiveId.fromString(i)); 102 102 } catch (IllegalArgumentException e) { 103 Main.warn( "RemoteControl: invalid selection '"+i+"' ignored");103 Main.warn(e, "RemoteControl: invalid selection '"+i+"' ignored."); 104 104 } 105 105 } -
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r10626 r10627 257 257 sources.add(org.openstreetmap.josm.gui.MainApplication.class.getClassLoader()); 258 258 } catch (SecurityException ex) { 259 Main.debug(ex); 259 260 sources.add(ImageProvider.class.getClassLoader()); 260 261 } -
trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java
r10358 r10627 216 216 s = tr(s); 217 217 } catch (IllegalArgumentException e) { 218 Main.debug(e); 218 219 Main.info(tr("Invalid plugin description ''{0}'' in plugin {1}", s, name)); 219 220 } -
trunk/src/org/openstreetmap/josm/plugins/PluginProxy.java
r10212 r10627 45 45 plugin.getClass().getMethod("mapFrameInitialized", MapFrame.class, MapFrame.class).invoke(plugin, oldFrame, newFrame); 46 46 } catch (NoSuchMethodException e) { 47 Main.trace(e); 47 48 Main.debug("Plugin "+plugin+" does not define mapFrameInitialized"); 48 49 } catch (InvocationTargetException | IllegalAccessException | IllegalArgumentException e) { … … 56 57 return (PreferenceSetting) plugin.getClass().getMethod("getPreferenceSetting").invoke(plugin); 57 58 } catch (NoSuchMethodException e) { 59 Main.trace(e); 58 60 Main.debug("Plugin "+plugin+" does not define getPreferenceSetting"); 59 61 return null; … … 69 71 plugin.getClass().getMethod("addDownloadSelection", List.class).invoke(plugin, list); 70 72 } catch (NoSuchMethodException e) { 73 Main.trace(e); 71 74 Main.debug("Plugin "+plugin+" does not define addDownloadSelection"); 72 75 } catch (InvocationTargetException | IllegalAccessException | IllegalArgumentException e) { -
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.