Index: /trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java	(revision 10627)
@@ -128,4 +128,5 @@
             } catch (IOException e) {
                 LOG.log(Level.WARNING, "JCS TMS - error loading from cache for tile {0}: {1}", new Object[] {tile.getKey(), e.getMessage()});
+                Main.warn(e);
             }
         }
@@ -296,4 +297,5 @@
             } catch (IOException e) {
                 LOG.log(Level.WARNING, "JCS TMS - error loading object for tile {0}: {1}", new Object[] {tile.getKey(), e.getMessage()});
+                Main.warn(e);
                 return null;
             }
Index: /trunk/src/org/openstreetmap/josm/data/osm/DatasetConsistencyTest.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/DatasetConsistencyTest.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/data/osm/DatasetConsistencyTest.java	(revision 10627)
@@ -215,4 +215,5 @@
             writer.println("Exception during dataset integrity test:");
             e.printStackTrace(writer);
+            Main.warn(e);
         }
     }
Index: /trunk/src/org/openstreetmap/josm/gui/GettingStarted.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/GettingStarted.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/GettingStarted.java	(revision 10627)
@@ -145,5 +145,5 @@
                     ProxyPreference.removeProxyPreferenceListener(GettingStarted.this);
                 } catch (IOException ex) {
-                    Main.warn(tr("Failed to read MOTD. Exception was: {0}", ex.toString()));
+                    Main.warn(ex, tr("Failed to read MOTD. Exception was: {0}", ex.toString()));
                     content = "<html>" + STYLE + "<h1>" + "JOSM - " + tr("Java OpenStreetMap Editor")
                             + "</h1>\n<h2 align=\"center\">(" + tr("Message of the day not available") + ")</h2></html>";
Index: /trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 10627)
@@ -536,5 +536,5 @@
                     Main.setOffline(OnlineResource.valueOf(s.toUpperCase(Locale.ENGLISH)));
                 } catch (IllegalArgumentException e) {
-                    Main.error(tr("''{0}'' is not a valid value for argument ''{1}''. Possible values are {2}, possibly delimited by commas.",
+                    Main.error(e, tr("''{0}'' is not a valid value for argument ''{1}''. Possible values are {2}, possibly delimited by commas.",
                             s.toUpperCase(Locale.ENGLISH), Option.OFFLINE.getName(), Arrays.toString(OnlineResource.values())));
                     System.exit(1);
Index: /trunk/src/org/openstreetmap/josm/gui/MapView.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MapView.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/MapView.java	(revision 10627)
@@ -361,7 +361,5 @@
         } catch (IllegalArgumentException e) {
             // Ignored in old implementation
-            if (Main.isDebugEnabled()) {
-                Main.debug(e.getMessage());
-            }
+            Main.debug(e);
         }
         try {
@@ -369,7 +367,5 @@
         } catch (IllegalArgumentException e) {
             // Ignored in old implementation
-            if (Main.isDebugEnabled()) {
-                Main.debug(e.getMessage());
-            }
+            Main.debug(e);
         }
     }
@@ -389,7 +385,5 @@
         } catch (IllegalArgumentException e) {
             // Ignored in old implementation
-            if (Main.isDebugEnabled()) {
-                Main.debug(e.getMessage());
-            }
+            Main.debug(e);
         }
     }
Index: /trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java	(revision 10627)
@@ -75,4 +75,5 @@
                     }
                 } catch (IllegalArgumentException ex) {
+                    Main.warn(ex);
                     if (ex.getMessage() != null && !ex.getMessage().isEmpty()) {
                         JOptionPane.showMessageDialog(Main.parent,
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/FilterTableModel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/FilterTableModel.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/FilterTableModel.java	(revision 10627)
@@ -64,4 +64,5 @@
                 filterMatcher.add(filter);
             } catch (ParseError e) {
+                Main.error(e);
                 JOptionPane.showMessageDialog(
                         Main.parent,
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/LatLonDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/LatLonDialog.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/LatLonDialog.java	(revision 10627)
@@ -236,4 +236,5 @@
             }
         } catch (IllegalArgumentException e) {
+            Main.trace(e);
             latLon = null;
         }
@@ -254,4 +255,5 @@
             en = parseEastNorth(tfEastNorth.getText());
         } catch (IllegalArgumentException e) {
+            Main.trace(e);
             en = null;
         }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java	(revision 10627)
@@ -656,4 +656,5 @@
                 }
             } catch (IOException ex) {
+                Main.error(ex);
                 txtSource.append("<ERROR: failed to read file!>");
             }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 10627)
@@ -110,4 +110,5 @@
             } catch (IllegalArgumentException e) {
                 // Legacy settings
+                Main.trace(e);
                 return Boolean.parseBoolean(s) ? ButtonHidingType.DYNAMIC : ButtonHidingType.ALWAYS_SHOWN;
             }
@@ -699,4 +700,5 @@
                 new WindowGeometry(preferencePrefix+".geometry").applySafe(this);
             } catch (WindowGeometryException e) {
+                Main.debug(e);
                 ToggleDialog.this.setPreferredSize(ToggleDialog.this.getDefaultDetachedSize());
                 pack();
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManager.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManager.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManager.java	(revision 10627)
@@ -393,4 +393,5 @@
                     }
                 } catch (IllegalStateException e) {
+                    Main.error(e);
                     JOptionPane.showMessageDialog(parent, e.getMessage(), tr("Error"), JOptionPane.ERROR_MESSAGE);
                 }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/BasicChangesetQueryPanel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/BasicChangesetQueryPanel.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/BasicChangesetQueryPanel.java	(revision 10627)
@@ -195,5 +195,5 @@
                 q = BasicQuery.valueOf(BasicQuery.class, value);
             } catch (IllegalArgumentException e) {
-                Main.warn(tr("Unexpected value for preference ''{0}'', got ''{1}''. Resetting to default query.",
+                Main.warn(e, tr("Unexpected value for preference ''{0}'', got ''{1}''. Resetting to default query.",
                         "changeset-query.basic.query", value));
                 q = BasicQuery.MOST_RECENT_CHANGESETS;
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/ChangesetQueryDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/ChangesetQueryDialog.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/ChangesetQueryDialog.java	(revision 10627)
@@ -23,4 +23,5 @@
 import javax.swing.KeyStroke;
 
+import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.gui.HelpAwareOptionPane;
 import org.openstreetmap.josm.gui.help.ContextSensitiveHelpAction;
@@ -192,4 +193,5 @@
                 setVisible(false);
             } catch (IllegalStateException e) {
+                Main.error(e);
                 JOptionPane.showMessageDialog(ChangesetQueryDialog.this, e.getMessage(), tr("Error"), JOptionPane.ERROR_MESSAGE);
             }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/UrlBasedQueryPanel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/UrlBasedQueryPanel.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/UrlBasedQueryPanel.java	(revision 10627)
@@ -134,5 +134,5 @@
             return ChangesetQuery.buildFromUrlQuery(url.getQuery());
         } catch (ChangesetQueryUrlException e) {
-            Main.warn(e.getMessage());
+            Main.warn(e);
             return null;
         }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java	(revision 10627)
@@ -935,4 +935,5 @@
             return modified ? new ChangeCommand(orig, relation) : null;
         } catch (AddAbortException ign) {
+            Main.trace(ign);
             return null;
         }
Index: /trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java	(revision 10627)
@@ -148,5 +148,5 @@
                     bookmarks.add(new Bookmark(entry));
                 } catch (IllegalArgumentException e) {
-                    Main.error(tr("Error reading bookmark entry: %s", e.getMessage()));
+                    Main.error(e, tr("Error reading bookmark entry: %s", e.getMessage()));
                 }
             }
Index: /trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java	(revision 10627)
@@ -138,4 +138,5 @@
             tpDownloadAreaSelectors.setSelectedIndex(Main.pref.getInteger("download.tab", 0));
         } catch (IndexOutOfBoundsException ex) {
+            Main.trace(ex);
             Main.pref.putInteger("download.tab", 0);
         }
Index: /trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java	(revision 10627)
@@ -301,12 +301,15 @@
             content = reader.fetchHelpTopicContent(url, true);
         } catch (MissingHelpContentException e) {
+            Main.trace(e);
             url = getHelpTopicUrl(buildAbsoluteHelpTopic(relativeHelpTopic, LocaleType.BASELANGUAGE));
             try {
                 content = reader.fetchHelpTopicContent(url, true);
             } catch (MissingHelpContentException e1) {
+                Main.trace(e1);
                 url = getHelpTopicUrl(buildAbsoluteHelpTopic(relativeHelpTopic, LocaleType.ENGLISH));
                 try {
                     content = reader.fetchHelpTopicContent(url, true);
                 } catch (MissingHelpContentException e2) {
+                    Main.debug(e2);
                     this.url = url;
                     handleMissingHelpContent(relativeHelpTopic);
@@ -344,4 +347,5 @@
             content = reader.fetchHelpTopicContent(url, true);
         } catch (MissingHelpContentException e) {
+            Main.debug(e);
             this.url = url;
             handleMissingHelpContent(absoluteHelpTopic);
Index: /trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java	(revision 10627)
@@ -144,4 +144,5 @@
             HistoryOsmPrimitive.forOsmPrimitive(primitive);
         } catch (IllegalArgumentException ign) {
+            Main.trace(ign);
             return false;
         }
Index: /trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java	(revision 10627)
@@ -110,5 +110,5 @@
             setAlwaysOnTop(true);
         } catch (SecurityException e) {
-            Main.warn(tr("Failed to put Credential Dialog always on top. Caught security exception."));
+            Main.warn(e, tr("Failed to put Credential Dialog always on top. Caught security exception."));
         }
         build();
Index: /trunk/src/org/openstreetmap/josm/gui/io/DownloadOpenChangesetsTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/DownloadOpenChangesetsTask.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/io/DownloadOpenChangesetsTask.java	(revision 10627)
@@ -110,5 +110,5 @@
                 im.setPartiallyIdentified(im.getUserName());
             }
-            Main.warn(tr("Failed to retrieve user infos for the current JOSM user. Exception was: {0}", e.toString()));
+            Main.warn(e, tr("Failed to retrieve user infos for the current JOSM user. Exception was: {0}", e.toString()));
         }
     }
Index: /trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java	(revision 10627)
@@ -493,4 +493,5 @@
                     currentFuture.get();
                 } catch (CancellationException e) {
+                    Main.trace(e);
                     model.setUploadState(layer, UploadOrSaveState.CANCELED);
                 } catch (InterruptedException | ExecutionException e) {
@@ -534,4 +535,5 @@
                     currentFuture.get();
                 } catch (CancellationException e) {
+                    Main.trace(e);
                     model.setSaveState(layerInfo.getLayer(), UploadOrSaveState.CANCELED);
                 } catch (InterruptedException | ExecutionException e) {
Index: /trunk/src/org/openstreetmap/josm/gui/io/UploadPrimitivesTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/UploadPrimitivesTask.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/io/UploadPrimitivesTask.java	(revision 10627)
@@ -228,6 +228,8 @@
             SwingUtilities.invokeAndWait(r);
         } catch (InterruptedException e) {
+            Main.trace(e);
             lastException = e;
         } catch (InvocationTargetException e) {
+            Main.trace(e);
             lastException = new OsmTransferException(e.getCause());
         }
Index: /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 10627)
@@ -942,4 +942,5 @@
                 sldSeconds.setValue((int) (deciSeconds % 60));
             } catch (RuntimeException e) {
+                Main.warn(e);
                 JOptionPane.showMessageDialog(Main.parent,
                         tr("An error occurred while trying to match the photos to the GPX track."
Index: /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java	(revision 10627)
@@ -183,4 +183,5 @@
                 addRecursiveFiles(files, selection);
             } catch (IllegalStateException e) {
+                Main.debug(e);
                 rememberError(e.getMessage());
             }
Index: /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java	(revision 10627)
@@ -152,4 +152,5 @@
                 return new TemplateParser(s).parse();
             } catch (ParseError e) {
+                Main.debug(e);
                 Main.warn("Unable to parse template engine pattern ''{0}'' for property {1}. Using default (''{2}'') instead",
                         s, getKey(), super.getDefaultValueAsString());
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java	(revision 10627)
@@ -261,4 +261,5 @@
                 return new Color(r, g, b);
             } catch (IllegalArgumentException e) {
+                Main.trace(e);
                 return null;
             }
@@ -279,4 +280,5 @@
                 return new Color(r, g, b, alpha);
             } catch (IllegalArgumentException e) {
+                Main.trace(e);
                 return null;
             }
@@ -294,4 +296,5 @@
                 return Color.getHSBColor(h, s, b);
             } catch (IllegalArgumentException e) {
+                Main.trace(e);
                 return null;
             }
@@ -628,4 +631,5 @@
                 return RotationAngle.parseCardinalRotation(cardinal);
             } catch (IllegalArgumentException ignore) {
+                Main.trace(ignore);
                 return null;
             }
@@ -668,4 +672,5 @@
                 m = SearchCompiler.compile(searchStr);
             } catch (ParseError ex) {
+                Main.trace(ex);
                 return null;
             }
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java	(revision 10627)
@@ -331,4 +331,5 @@
                     };
                 } catch (NoSuchElementException ignore) {
+                    Main.trace(ignore);
                     containsFinder = new ContainsFinder(e);
                 }
@@ -468,5 +469,5 @@
                     if (!c.applies(env)) return false;
                 } catch (PatternSyntaxException e) {
-                    Main.error("PatternSyntaxException while applying condition" + c +": "+e.getMessage());
+                    Main.error(e, "PatternSyntaxException while applying condition" + c + ':');
                     return false;
                 }
Index: /trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java	(revision 10627)
@@ -343,4 +343,5 @@
                         userName));
         } catch (OsmOAuthAuthorizationException e) {
+            Main.debug(e);
             throw new OsmLoginFailedException(e.getCause());
         } catch (IOException e) {
Index: /trunk/src/org/openstreetmap/josm/gui/oauth/RetrieveAccessTokenTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/oauth/RetrieveAccessTokenTask.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/oauth/RetrieveAccessTokenTask.java	(revision 10627)
@@ -87,4 +87,5 @@
             accessToken = client.getAccessToken(getProgressMonitor().createSubTaskMonitor(0, false));
         } catch (OsmTransferCanceledException e) {
+            Main.trace(e);
             return;
         } catch (final OsmOAuthAuthorizationException e) {
Index: /trunk/src/org/openstreetmap/josm/gui/oauth/RetrieveRequestTokenTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/oauth/RetrieveRequestTokenTask.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/oauth/RetrieveRequestTokenTask.java	(revision 10627)
@@ -81,4 +81,5 @@
             requestToken = client.getRequestToken(getProgressMonitor().createSubTaskMonitor(0, false));
         } catch (OsmTransferCanceledException e) {
+            Main.trace(e);
             return;
         } catch (final OsmOAuthAuthorizationException e) {
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java	(revision 10627)
@@ -338,5 +338,5 @@
                         Main.pref.save();
                     } catch (IOException e) {
-                        Main.warn("IOException while saving preferences: "+e.getMessage());
+                        Main.warn(e, "IOException while saving preferences:");
                     }
                     readPreferences(Main.pref);
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java	(revision 10627)
@@ -453,4 +453,5 @@
             parser.parse();
         } catch (ParseError e) {
+            Main.warn(e);
             JOptionPane.showMessageDialog(Main.parent,
                     tr("Incorrect waypoint label pattern: {0}", e.getMessage()), tr("Incorrect pattern"), JOptionPane.ERROR_MESSAGE);
@@ -462,4 +463,5 @@
             parser.parse();
         } catch (ParseError e) {
+            Main.warn(e);
             JOptionPane.showMessageDialog(Main.parent,
                     tr("Incorrect audio waypoint label pattern: {0}", e.getMessage()), tr("Incorrect pattern"), JOptionPane.ERROR_MESSAGE);
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java	(revision 10627)
@@ -86,5 +86,5 @@
             } catch (ReflectiveOperationException ex) {
                 // just debug, Quaqua may not even be installed...
-                Main.debug(ex.getMessage());
+                Main.debug(ex);
             }
         }
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java	(revision 10627)
@@ -764,4 +764,5 @@
                     htmlPane = new JosmEditorPane(url);
                 } catch (IOException e1) {
+                    Main.trace(e1);
                     // give a second chance with a default Locale 'en'
                     try {
@@ -769,4 +770,5 @@
                         htmlPane = new JosmEditorPane(url);
                     } catch (IOException e2) {
+                        Main.debug(e2);
                         JOptionPane.showMessageDialog(gui, tr("EULA license URL not available: {0}", eulaUrl));
                         return false;
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java	(revision 10627)
@@ -57,5 +57,5 @@
                             canLoad = true;
                         } catch (IOException e) {
-                            Main.warn(tr("Could not read tagging preset source: {0}", source));
+                            Main.warn(e, tr("Could not read tagging preset source: {0}", source));
                             ExtendedDialog ed = new ExtendedDialog(Main.parent, tr("Error"),
                                     new String[] {tr("Yes"), tr("No"), tr("Cancel")});
@@ -82,5 +82,5 @@
                             // Should not happen, but at least show message
                             String msg = tr("Could not read tagging preset source {0}", source);
-                            Main.error(msg);
+                            Main.error(e, msg);
                             JOptionPane.showMessageDialog(Main.parent, msg);
                             return false;
@@ -95,4 +95,5 @@
                                         source, e.getLineNumber(), e.getColumnNumber(), e.getMessage());
                             }
+                            Main.warn(e, errorMessage);
                         } catch (SAXException e) {
                             if (canLoad) {
@@ -105,4 +106,5 @@
                                         source, e.getMessage());
                             }
+                            Main.warn(e, errorMessage);
                         }
 
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/projection/CustomProjectionChoice.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/projection/CustomProjectionChoice.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/projection/CustomProjectionChoice.java	(revision 10627)
@@ -97,4 +97,5 @@
                         test.update(input.getText());
                     } catch (ProjectionConfigurationException ex) {
+                        Main.warn(ex);
                         error = ex.getMessage();
                         valStatus.setIcon(ImageProvider.get("data", "error"));
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/server/ApiUrlTestTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/server/ApiUrlTestTask.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/server/ApiUrlTestTask.java	(revision 10627)
@@ -191,5 +191,5 @@
                 Capabilities.CapabilitiesParser.parse(new InputSource(connection.getResponse().getContent()));
             } catch (SAXException | ParserConfigurationException e) {
-                Main.warn(e.getMessage());
+                Main.warn(e);
                 alertInvalidCapabilities();
                 return;
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionManager.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionManager.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionManager.java	(revision 10627)
@@ -222,5 +222,5 @@
                     PRESET_TAG_CACHE.putAll(ki.key, ki.getValues());
                 } catch (NullPointerException e) {
-                    Main.error(p + ": Unable to cache " + ki);
+                    Main.error(e, p + ": Unable to cache " + ki);
                 }
             }
Index: /trunk/src/org/openstreetmap/josm/gui/widgets/JosmPasswordField.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/widgets/JosmPasswordField.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/widgets/JosmPasswordField.java	(revision 10627)
@@ -126,5 +126,5 @@
                         pasteAction.actionPerformed(e);
                     } catch (NullPointerException npe) {
-                        Main.error("NullPointerException occured because of JDK bug 6322854. "
+                        Main.error(npe, "NullPointerException occured because of JDK bug 6322854. "
                                 +"Copy/Paste operation has not been performed. Please complain to Oracle: "+
                                 "https://bugs.openjdk.java.net/browse/JDK-6322854");
Index: /trunk/src/org/openstreetmap/josm/gui/widgets/OsmIdTextField.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/widgets/OsmIdTextField.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/gui/widgets/OsmIdTextField.java	(revision 10627)
@@ -10,4 +10,5 @@
 import javax.swing.text.JTextComponent;
 
+import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
 import org.openstreetmap.josm.data.osm.PrimitiveId;
@@ -110,4 +111,5 @@
                     } catch (IllegalArgumentException ex) {
                         try {
+                            Main.trace(ex);
                             long id = Long.parseLong(s);
                             if (id <= 0) {
@@ -123,4 +125,5 @@
                             }
                         } catch (IllegalArgumentException ex2) {
+                            Main.trace(ex2);
                             return false;
                         }
Index: /trunk/src/org/openstreetmap/josm/io/CacheCustomContent.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/CacheCustomContent.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/io/CacheCustomContent.java	(revision 10627)
@@ -97,4 +97,5 @@
             return false;
         } catch (OfflineAccessException e) {
+            Main.trace(e);
             return true;
         }
@@ -185,4 +186,5 @@
             }
         } catch (IOException e) {
+            Main.trace(e);
             if (!isOffline()) {
                 this.data = updateForce();
Index: /trunk/src/org/openstreetmap/josm/io/CachedFile.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 10627)
@@ -354,5 +354,5 @@
         } catch (IOException e) {
             if (file.getName().endsWith(".zip")) {
-                Main.warn(tr("Failed to open file with extension ''{2}'' and namepart ''{3}'' in zip file ''{0}''. Exception was: {1}",
+                Main.warn(e, tr("Failed to open file with extension ''{2}'' and namepart ''{3}'' in zip file ''{0}''. Exception was: {1}",
                         file.getName(), e.toString(), extension, namepart));
             }
@@ -425,4 +425,5 @@
             checkOfflineAccess(urlStr);
         } catch (OfflineAccessException e) {
+            Main.trace(e);
             offline = true;
         }
Index: /trunk/src/org/openstreetmap/josm/io/MessageNotifier.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/MessageNotifier.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/io/MessageNotifier.java	(revision 10627)
@@ -147,5 +147,5 @@
                 }
             } catch (CredentialsAgentException e) {
-                Main.warn("Unable to get credentials: "+e.getMessage());
+                Main.warn(e, "Unable to get credentials:");
             }
         }
Index: /trunk/src/org/openstreetmap/josm/io/NmeaReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/NmeaReader.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/io/NmeaReader.java	(revision 10627)
@@ -440,4 +440,5 @@
         } catch (RuntimeException x) {
             // out of bounds and such
+            Main.debug(x);
             ps.malformed++;
             ps.pWp = null;
Index: /trunk/src/org/openstreetmap/josm/io/OsmApi.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmApi.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/io/OsmApi.java	(revision 10627)
@@ -212,4 +212,5 @@
                 initializeCapabilities(cache.updateIfRequiredString());
             } catch (SAXParseException parseException) {
+                Main.trace(parseException);
                 // XML parsing may fail if JOSM previously stored a corrupted capabilities document (see #8278)
                 // In that case, force update and try again
Index: /trunk/src/org/openstreetmap/josm/io/OsmReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmReader.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/io/OsmReader.java	(revision 10627)
@@ -528,4 +528,5 @@
             } catch (IllegalStateException e) {
                 // thrown for positive changeset id on new primitives
+                Main.debug(e);
                 Main.info(e.getMessage());
                 current.setChangesetId(0);
Index: /trunk/src/org/openstreetmap/josm/io/auth/CredentialsManager.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/auth/CredentialsManager.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/io/auth/CredentialsManager.java	(revision 10627)
@@ -7,4 +7,5 @@
 import java.util.Objects;
 
+import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.oauth.OAuthToken;
 import org.openstreetmap.josm.gui.JosmUserIdentityManager;
@@ -103,4 +104,5 @@
             }
         } catch (CredentialsAgentException ex) {
+            Main.debug(ex);
             return null;
         }
Index: /trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java	(revision 10627)
@@ -203,4 +203,5 @@
                                         atts.getValue("max-lon"), ",");
                     } catch (IllegalArgumentException e) {
+                        Main.trace(e);
                         break;
                     }
@@ -235,4 +236,5 @@
                         shape.addPoint(atts.getValue("lat"), atts.getValue("lon"));
                     } catch (IllegalArgumentException e) {
+                        Main.trace(e);
                         break;
                     }
Index: /trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpServer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpServer.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpServer.java	(revision 10627)
@@ -37,4 +37,5 @@
             instance4.start();
         } catch (IOException ex) {
+            Main.debug(ex);
             Main.warn(marktr("Cannot start IPv4 remotecontrol server on port {0}: {1}"),
                     Integer.toString(port), ex.getLocalizedMessage());
@@ -46,4 +47,5 @@
             /* only show error when we also have no IPv4 */
             if (instance4 == null) {
+                Main.debug(ex);
                 Main.warn(marktr("Cannot start IPv6 remotecontrol server on port {0}: {1}"),
                     Integer.toString(port), ex.getLocalizedMessage());
Index: /trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java	(revision 10627)
@@ -318,4 +318,5 @@
                 instance4.start();
             } catch (IOException | GeneralSecurityException ex) {
+                Main.debug(ex);
                 Main.warn(marktr("Cannot start IPv4 remotecontrol https server on port {0}: {1}"),
                         Integer.toString(port), ex.getLocalizedMessage());
@@ -327,4 +328,5 @@
                 /* only show error when we also have no IPv4 */
                 if (instance4 == null) {
+                    Main.debug(ex);
                     Main.warn(marktr("Cannot start IPv6 remotecontrol https server on port {0}: {1}"),
                         Integer.toString(port), ex.getLocalizedMessage());
Index: /trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java	(revision 10627)
@@ -241,8 +241,11 @@
                     out.flush();
                 } catch (RequestHandlerErrorException ex) {
+                    Main.debug(ex);
                     sendError(out);
                 } catch (RequestHandlerBadRequestException ex) {
+                    Main.debug(ex);
                     sendBadRequest(out, ex.getMessage());
                 } catch (RequestHandlerForbiddenException ex) {
+                    Main.debug(ex);
                     sendForbidden(out, ex.getMessage());
                 }
Index: /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadObjectHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadObjectHandler.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadObjectHandler.java	(revision 10627)
@@ -101,5 +101,5 @@
                 ps.add(SimplePrimitiveId.fromString(i));
             } catch (IllegalArgumentException e) {
-                Main.warn("RemoteControl: invalid selection '"+i+"' ignored");
+                Main.warn(e, "RemoteControl: invalid selection '"+i+"' ignored.");
             }
         }
Index: /trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 10627)
@@ -257,4 +257,5 @@
             sources.add(org.openstreetmap.josm.gui.MainApplication.class.getClassLoader());
         } catch (SecurityException ex) {
+            Main.debug(ex);
             sources.add(ImageProvider.class.getClassLoader());
         }
Index: /trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java	(revision 10627)
@@ -216,4 +216,5 @@
                     s = tr(s);
                 } catch (IllegalArgumentException e) {
+                    Main.debug(e);
                     Main.info(tr("Invalid plugin description ''{0}'' in plugin {1}", s, name));
                 }
Index: /trunk/src/org/openstreetmap/josm/plugins/PluginProxy.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/plugins/PluginProxy.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/plugins/PluginProxy.java	(revision 10627)
@@ -45,4 +45,5 @@
             plugin.getClass().getMethod("mapFrameInitialized", MapFrame.class, MapFrame.class).invoke(plugin, oldFrame, newFrame);
         } catch (NoSuchMethodException e) {
+            Main.trace(e);
             Main.debug("Plugin "+plugin+" does not define mapFrameInitialized");
         } catch (InvocationTargetException | IllegalAccessException | IllegalArgumentException e) {
@@ -56,4 +57,5 @@
             return (PreferenceSetting) plugin.getClass().getMethod("getPreferenceSetting").invoke(plugin);
         } catch (NoSuchMethodException e) {
+            Main.trace(e);
             Main.debug("Plugin "+plugin+" does not define getPreferenceSetting");
             return null;
@@ -69,4 +71,5 @@
             plugin.getClass().getMethod("addDownloadSelection", List.class).invoke(plugin, list);
         } catch (NoSuchMethodException e) {
+            Main.trace(e);
             Main.debug("Plugin "+plugin+" does not define addDownloadSelection");
         } catch (InvocationTargetException | IllegalAccessException | IllegalArgumentException e) {
Index: /trunk/src/org/openstreetmap/josm/tools/AudioUtil.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/AudioUtil.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/tools/AudioUtil.java	(revision 10627)
@@ -41,7 +41,5 @@
             return naturalLength / calibration;
         } catch (UnsupportedAudioFileException | IOException e) {
-            if (Main.isDebugEnabled()) {
-                Main.debug(e.getMessage());
-            }
+            Main.debug(e);
             return 0.0;
         }
Index: /trunk/src/org/openstreetmap/josm/tools/Geometry.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/Geometry.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/tools/Geometry.java	(revision 10627)
@@ -911,4 +911,5 @@
             innerRings = MultipolygonBuilder.joinWays(mpm.inners);
         } catch (MultipolygonBuilder.JoinedPolygonCreationException ex) {
+            Main.trace(ex);
             Main.debug("Invalid multipolygon " + multiPolygon);
             return false;
Index: /trunk/src/org/openstreetmap/josm/tools/I18n.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 10627)
@@ -642,4 +642,5 @@
             }
         } catch (IOException e) {
+            Main.trace(e);
             return false;
         }
Index: /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 10627)
@@ -959,5 +959,5 @@
                     img = read(Utils.fileToURL(cf.getFile()), false, false);
                 } catch (IOException e) {
-                    Main.warn("IOException while reading HTTP image: "+e.getMessage());
+                    Main.warn(e, "IOException while reading HTTP image:");
                 }
                 return img == null ? null : new ImageResource(img);
@@ -966,4 +966,5 @@
             }
         } catch (IOException e) {
+            Main.debug(e);
             return null;
         } finally {
@@ -990,5 +991,5 @@
                     bytes = Utils.decodeUrl(data).getBytes(StandardCharsets.UTF_8);
                 } catch (IllegalArgumentException ex) {
-                    Main.warn("Unable to decode URL data part: "+ex.getMessage() + " (" + data + ')');
+                    Main.warn(ex, "Unable to decode URL data part: "+ex.getMessage() + " (" + data + ')');
                     return null;
                 }
@@ -1017,5 +1018,5 @@
                     return img == null ? null : new ImageResource(img);
                 } catch (IOException e) {
-                    Main.warn("IOException while reading image: "+e.getMessage());
+                    Main.warn(e, "IOException while reading image:");
                 }
             }
@@ -1111,5 +1112,5 @@
             }
         } catch (IOException e) {
-            Main.warn(tr("Failed to handle zip file ''{0}''. Exception was: {1}", archive.getName(), e.toString()));
+            Main.warn(e, tr("Failed to handle zip file ''{0}''. Exception was: {1}", archive.getName(), e.toString()));
         }
         return null;
@@ -1182,5 +1183,5 @@
                         return u;
                 } catch (SecurityException e) {
-                    Main.warn(tr(
+                    Main.warn(e, tr(
                             "Failed to access directory ''{0}'' for security reasons. Exception was: {1}",
                             name, e.toString()));
@@ -1197,5 +1198,5 @@
                     return u;
             } catch (SecurityException e) {
-                Main.warn(tr(
+                Main.warn(e, tr(
                         "Failed to access directory ''{0}'' for security reasons. Exception was: {1}", dir, e
                         .toString()));
@@ -1271,4 +1272,5 @@
             cf.close();
         } catch (SAXReturnException r) {
+            Main.trace(r);
             return r.getResult();
         } catch (IOException | SAXException e) {
@@ -1545,5 +1547,5 @@
             }
         } catch (SVGException ex) {
-            Main.error("Unable to load svg: {0}", ex.getMessage());
+            Main.error(ex, "Unable to load svg:");
             return null;
         }
Index: /trunk/src/org/openstreetmap/josm/tools/OpenBrowser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/OpenBrowser.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/tools/OpenBrowser.java	(revision 10627)
@@ -59,5 +59,5 @@
                         // Workaround for KDE (Desktop API is severely flawed)
                         // see https://bugs.openjdk.java.net/browse/JDK-6486393
-                        Main.warn("Desktop class failed. Platform dependent fall back for open url in browser.");
+                        Main.warn(e, "Desktop class failed. Platform dependent fall back for open url in browser.");
                         displayUrlFallback(uri);
                     }
@@ -72,4 +72,5 @@
                 displayUrlFallback(uri);
             } catch (IOException e) {
+                Main.debug(e);
                 return e.getMessage();
             }
@@ -90,4 +91,5 @@
             return displayUrl(new URI(url));
         } catch (URISyntaxException e) {
+            Main.debug(e);
             return e.getMessage();
         }
Index: /trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java	(revision 10627)
@@ -67,4 +67,5 @@
                 enableOSXFullscreen((Window) Main.parent);
             } catch (IllegalAccessException e) {
+                Main.debug(e);
                 // with Java 9, module java.desktop does not export com.apple.eawt, use new Desktop API instead
                 setHandlers(Desktop.class, quitHandler, aboutHandler, openFilesHandler, preferencesHandler, proxy, Desktop.getDesktop());
@@ -89,4 +90,5 @@
             return Class.forName("com.apple.eawt."+className);
         } catch (ClassNotFoundException e) {
+            Main.trace(e);
             return Class.forName("java.awt.desktop."+className);
         }
@@ -148,4 +150,5 @@
                     args[1].getClass().getDeclaredMethod(closed ? "performQuit" : "cancelQuit").invoke(args[1]);
                 } catch (IllegalAccessException e) {
+                    Main.debug(e);
                     // with Java 9, module java.desktop does not export com.apple.eawt, use new Desktop API instead
                     Class.forName("java.awt.desktop.QuitResponse").getMethod(closed ? "performQuit" : "cancelQuit").invoke(args[1]);
Index: /trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java	(revision 10627)
@@ -192,8 +192,6 @@
             return "Debian".equalsIgnoreCase(dist) || "Ubuntu".equalsIgnoreCase(dist) || "Mint".equalsIgnoreCase(dist);
         } catch (IOException e) {
-            if (Main.isDebugEnabled()) {
-                // lsb_release is not available on all Linux systems, so don't log at warning level
-                Main.debug(e.getMessage());
-            }
+            // lsb_release is not available on all Linux systems, so don't log at warning level
+            Main.debug(e);
             return false;
         }
@@ -303,4 +301,5 @@
                 }
             } catch (IOException e) {
+                Main.debug(e);
                 // Non LSB-compliant Linux system. List of common fallback release files: http://linuxmafia.com/faq/Admin/release-files.html
                 for (LinuxReleaseInfo info : new LinuxReleaseInfo[]{
Index: /trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java	(revision 10627)
@@ -268,5 +268,5 @@
                     ks.deleteEntry(alias);
                 } catch (KeyStoreException e) {
-                    Main.error(tr("Unable to remove insecure certificate from keystore: {0}", e.getMessage()));
+                    Main.error(e, tr("Unable to remove insecure certificate from keystore: {0}", e.getMessage()));
                 }
             }
Index: /trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 10627)
@@ -1326,4 +1326,5 @@
             return true;
         } catch (MalformedURLException | NullPointerException e) {
+            Main.trace(e);
             return false;
         }
Index: /trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java	(revision 10627)
@@ -89,7 +89,5 @@
             initFromPreferences(preferenceKey);
         } catch (WindowGeometryException e) {
-            if (Main.isDebugEnabled()) {
-                Main.debug(e.getMessage());
-            }
+            Main.debug(e);
             initFromWindowGeometry(defaultGeometry);
         }
Index: /trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java	(revision 10626)
+++ /trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java	(revision 10627)
@@ -204,4 +204,5 @@
                     return f;
                 } catch (NoSuchFieldException ex) {
+                    Main.trace(ex);
                     fields.put(s, null);
                     return null;
@@ -251,5 +252,5 @@
             } catch (SAXException e) {
                 // Exception very unlikely to happen, so no need to translate this
-                Main.error("Cannot disable 'load-external-dtd' feature: "+e.getMessage());
+                Main.error(e, "Cannot disable 'load-external-dtd' feature:");
             }
             reader.parse(new InputSource(in));
