Index: /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapRendererFactory.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapRendererFactory.java	(revision 13206)
+++ /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapRendererFactory.java	(revision 13207)
@@ -6,5 +6,4 @@
 import java.awt.Graphics2D;
 import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
 import java.text.MessageFormat;
 import java.util.ArrayList;
@@ -307,7 +306,4 @@
             Constructor<?> c = activeRenderer.getConstructor(Graphics2D.class, NavigatableComponent.class, boolean.class);
             return AbstractMapRenderer.class.cast(c.newInstance(g, viewport, isInactiveMode));
-        } catch (InvocationTargetException e) {
-            Logging.debug(e);
-            throw new MapRendererFactoryException(e.getCause());
         } catch (ReflectiveOperationException | IllegalArgumentException e) {
             throw new MapRendererFactoryException(e);
Index: /trunk/src/org/openstreetmap/josm/data/projection/ProjectionCLI.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/projection/ProjectionCLI.java	(revision 13206)
+++ /trunk/src/org/openstreetmap/josm/data/projection/ProjectionCLI.java	(revision 13207)
@@ -196,5 +196,5 @@
             return Double.parseDouble(s);
         } catch (NumberFormatException nfe) {
-            throw new IllegalArgumentException(tr("Unable to parse number ''{0}''", s));
+            throw new IllegalArgumentException(tr("Unable to parse number ''{0}''", s), nfe);
         }
     }
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/RenderingCLI.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/RenderingCLI.java	(revision 13206)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/RenderingCLI.java	(revision 13207)
@@ -231,5 +231,5 @@
                 } catch (NumberFormatException nfe) {
                     throw new IllegalArgumentException(
-                            tr("Expected integer number for option {0}, but got ''{1}''", "--zoom", getopt.getOptarg()));
+                            tr("Expected integer number for option {0}, but got ''{1}''", "--zoom", getopt.getOptarg()), nfe);
                 }
                 if (argZoom < 0)
@@ -242,5 +242,5 @@
                         argBounds = new Bounds(getopt.getOptarg(), ",", Bounds.ParseMethod.LEFT_BOTTOM_RIGHT_TOP, false);
                     } catch (IllegalArgumentException iae) { // NOPMD
-                        throw new IllegalArgumentException(tr("Unable to parse {0} parameter: {1}", "--bounds", iae.getMessage()));
+                        throw new IllegalArgumentException(tr("Unable to parse {0} parameter: {1}", "--bounds", iae.getMessage()), iae);
                     }
                 }
@@ -268,5 +268,5 @@
                     } catch (NumberFormatException nfe) {
                         throw new IllegalArgumentException(
-                                tr("Expected floating point number for option {0}, but got ''{1}''", "--scale", getopt.getOptarg()));
+                                tr("Expected floating point number for option {0}, but got ''{1}''", "--scale", getopt.getOptarg()), nfe);
                     }
                     break;
@@ -282,5 +282,5 @@
                         argAnchor = new LatLon(lat, lon);
                     } catch (IllegalArgumentException iae) { // NOPMD
-                        throw new IllegalArgumentException(tr("In option {0}: {1}", "--anchor", iae.getMessage()));
+                        throw new IllegalArgumentException(tr("In option {0}: {1}", "--anchor", iae.getMessage()), iae);
                     }
                     break;
@@ -290,5 +290,5 @@
                     } catch (NumberFormatException nfe) {
                         throw new IllegalArgumentException(
-                                tr("Expected floating point number for option {0}, but got ''{1}''", "--width-m", getopt.getOptarg()));
+                                tr("Expected floating point number for option {0}, but got ''{1}''", "--width-m", getopt.getOptarg()), nfe);
                     }
                     if (argWidthM <= 0) throw new IllegalArgumentException(
@@ -300,5 +300,5 @@
                     } catch (NumberFormatException nfe) {
                         throw new IllegalArgumentException(
-                                tr("Expected floating point number for option {0}, but got ''{1}''", "--height-m", getopt.getOptarg()));
+                                tr("Expected floating point number for option {0}, but got ''{1}''", "--height-m", getopt.getOptarg()), nfe);
                     }
                     if (argHeightM <= 0) throw new IllegalArgumentException(
@@ -310,5 +310,5 @@
                     } catch (NumberFormatException nfe) {
                         throw new IllegalArgumentException(
-                                tr("Expected integer number for option {0}, but got ''{1}''", "--width-px", getopt.getOptarg()));
+                                tr("Expected integer number for option {0}, but got ''{1}''", "--width-px", getopt.getOptarg()), nfe);
                     }
                     if (argWidthPx <= 0) throw new IllegalArgumentException(
@@ -320,5 +320,5 @@
                     } catch (NumberFormatException nfe) {
                         throw new IllegalArgumentException(
-                                tr("Expected integer number for option {0}, but got ''{1}''", "--height-px", getopt.getOptarg()));
+                                tr("Expected integer number for option {0}, but got ''{1}''", "--height-px", getopt.getOptarg()), nfe);
                     }
                     if (argHeightPx <= 0) throw new IllegalArgumentException(
@@ -333,5 +333,5 @@
                     } catch (NumberFormatException nfe) {
                         throw new IllegalArgumentException(
-                                tr("Expected integer number for option {0}, but got ''{1}''", "--max-image-size", getopt.getOptarg()));
+                                tr("Expected integer number for option {0}, but got ''{1}''", "--max-image-size", getopt.getOptarg()), nfe);
                     }
                     if (argMaxImageSize < 0) throw new IllegalArgumentException(
@@ -551,5 +551,5 @@
             return OsmReader.parseDataSet(Files.newInputStream(Paths.get(argInput)), null);
         } catch (IllegalDataException e) {
-            throw new IllegalDataException(tr("In .osm data file ''{0}'' - ", argInput) + e.getMessage());
+            throw new IllegalDataException(tr("In .osm data file ''{0}'' - ", argInput) + e.getMessage(), e);
         }
     }
Index: /trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java	(revision 13206)
+++ /trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java	(revision 13207)
@@ -328,8 +328,5 @@
                 throw new OsmOAuthAuthorizationException(tr("Failed to authenticate user ''{0}'' with password ''***'' as OAuth user",
                         userName));
-        } catch (OsmOAuthAuthorizationException e) {
-            Logging.debug(e);
-            throw new OsmLoginFailedException(e.getCause());
-        } catch (IOException e) {
+        } catch (OsmOAuthAuthorizationException | IOException e) {
             throw new OsmLoginFailedException(e);
         } finally {
Index: /trunk/src/org/openstreetmap/josm/io/ChangesetClosedException.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/ChangesetClosedException.java	(revision 13206)
+++ /trunk/src/org/openstreetmap/josm/io/ChangesetClosedException.java	(revision 13207)
@@ -98,6 +98,5 @@
 
     /**
-     * Creates the exception with the given error header and the given
-     * source.
+     * Creates the exception with the given error header and source.
      *
      * @param errorHeader the error header
@@ -105,5 +104,18 @@
      */
     public ChangesetClosedException(String errorHeader, Source source) {
-        super(errorHeader);
+        this(errorHeader, source, null);
+    }
+
+    /**
+     * Creates the exception with the given error header, source and cause.
+     *
+     * @param errorHeader the error header
+     * @param source the source for the exception
+     * @param cause  The cause (which is saved for later retrieval by the {@link #getCause} method).
+     *               A null value is permitted, and indicates that the cause is nonexistent or unknown.
+     * @since 13207
+     */
+    public ChangesetClosedException(String errorHeader, Source source, Throwable cause) {
+        super(errorHeader, cause);
         parseErrorHeader(errorHeader);
         this.source = source == null ? Source.UNSPECIFIED : source;
Index: /trunk/src/org/openstreetmap/josm/io/OsmApi.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmApi.java	(revision 13206)
+++ /trunk/src/org/openstreetmap/josm/io/OsmApi.java	(revision 13207)
@@ -487,5 +487,5 @@
             String errorHeader = e.getErrorHeader();
             if (e.getResponseCode() == HttpURLConnection.HTTP_CONFLICT && ChangesetClosedException.errorHeaderMatchesPattern(errorHeader))
-                throw new ChangesetClosedException(errorHeader, ChangesetClosedException.Source.UPDATE_CHANGESET);
+                throw new ChangesetClosedException(errorHeader, ChangesetClosedException.Source.UPDATE_CHANGESET, e);
             throw e;
         } finally {
Index: /trunk/tools/pmd/josm-ruleset.xml
===================================================================
--- /trunk/tools/pmd/josm-ruleset.xml	(revision 13206)
+++ /trunk/tools/pmd/josm-ruleset.xml	(revision 13207)
@@ -30,4 +30,9 @@
     <exclude name="UnusedFormalParameter"/>
     <exclude name="UseVarargs"/>
+  </rule>
+  <rule ref="category/java/bestpractices.xml/PreserveStackTrace">
+    <properties>
+        <property name="violationSuppressXPath" value="//PrimaryExpression/PrimaryPrefix/Name[@Image='BugReport.intercept']"/>
+    </properties>
   </rule>
   <rule ref="category/java/bestpractices.xml/UnusedFormalParameter">
