Index: /trunk/src/org/openstreetmap/josm/actions/MoveAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/MoveAction.java	(revision 6797)
+++ /trunk/src/org/openstreetmap/josm/actions/MoveAction.java	(revision 6798)
@@ -55,5 +55,5 @@
         } else if (dir == Direction.LEFT)  {
             sc = Shortcut.registerShortcut("core:moveleft",  tr("Move objects {0}", tr("left")), KeyEvent.VK_LEFT,  Shortcut.SHIFT);
-        } else { //dir == Direction.RIGHT) {
+        } else { //dir == Direction.RIGHT
             sc = Shortcut.registerShortcut("core:moveright", tr("Move objects {0}", tr("right")), KeyEvent.VK_RIGHT, Shortcut.SHIFT);
         }
@@ -73,5 +73,5 @@
         } else if (dir == Direction.LEFT)  {
             putValue("toolbar", "action/move/left");
-        } else { //dir == Direction.RIGHT) {
+        } else { //dir == Direction.RIGHT
             putValue("toolbar", "action/move/right");
         }
Index: /trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java	(revision 6797)
+++ /trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java	(revision 6798)
@@ -41,5 +41,5 @@
  */
 public final class OrthogonalizeAction extends JosmAction {
-    private String USAGE = tr(
+    private static final String USAGE = tr(
             "<h3>When one or more ways are selected, the shape is adjusted such, that all angles are 90 or 180 degrees.</h3>"+
             "You can add two nodes to the selection. Then, the direction is fixed by these two reference nodes. "+
@@ -279,5 +279,5 @@
             throw new InvalidUserInputException(
                     tr("<html>Please make sure all selected ways head in a similar direction<br>"+
-                    "or orthogonalize them one by one.</html>"));
+                    "or orthogonalize them one by one.</html>"), ex);
         }
 
@@ -439,5 +439,5 @@
                     direction = direction.changeBy(angleToDirectionChange(h2 - h1, TOLERANCE1));
                 } catch (RejectedAngleException ex) {
-                    throw new InvalidUserInputException(tr("Please select ways with angles of approximately 90 or 180 degrees."));
+                    throw new InvalidUserInputException(tr("Please select ways with angles of approximately 90 or 180 degrees."), ex);
                 }
                 segDirections[i+1] = direction;
@@ -574,4 +574,7 @@
             super(message);
         }
+        InvalidUserInputException(String message, Throwable cause) {
+            super(message, cause);
+        }
         InvalidUserInputException() {
             super();
Index: /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmCompressedTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmCompressedTask.java	(revision 6797)
+++ /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmCompressedTask.java	(revision 6798)
@@ -19,5 +19,5 @@
 public class DownloadOsmCompressedTask extends DownloadOsmTask {
 
-    String PATTERN_GZ =  "https?://.*/.*\\.osm.(gz|bz2?)";
+    static final String PATTERN_GZ =  "https?://.*/.*\\.osm.(gz|bz2?)";
 
     @Override
Index: /trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 6797)
+++ /trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 6798)
@@ -86,5 +86,5 @@
 
     private Node lastUsedNode = null;
-    private double PHI=Math.toRadians(90);
+    private static final double PHI = Math.toRadians(90);
     private double toleranceMultiplier;
 
Index: /trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 6797)
+++ /trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 6798)
@@ -445,14 +445,14 @@
                     this.keyPattern = Pattern.compile(key, searchFlags);
                 } catch (PatternSyntaxException e) {
-                    throw new ParseError(tr(rxErrorMsg, e.getPattern(), e.getIndex(), e.getMessage()));
+                    throw new ParseError(tr(rxErrorMsg, e.getPattern(), e.getIndex(), e.getMessage()), e);
                 } catch (Exception e) {
-                    throw new ParseError(tr(rxErrorMsgNoPos, key, e.getMessage()));
+                    throw new ParseError(tr(rxErrorMsgNoPos, key, e.getMessage()), e);
                 }
                 try {
                     this.valuePattern = Pattern.compile(value, searchFlags);
                 } catch (PatternSyntaxException e) {
-                    throw new ParseError(tr(rxErrorMsg, e.getPattern(), e.getIndex(), e.getMessage()));
+                    throw new ParseError(tr(rxErrorMsg, e.getPattern(), e.getIndex(), e.getMessage()), e);
                 } catch (Exception e) {
-                    throw new ParseError(tr(rxErrorMsgNoPos, value, e.getMessage()));
+                    throw new ParseError(tr(rxErrorMsgNoPos, value, e.getMessage()), e);
                 }
                 this.key = key;
@@ -696,7 +696,7 @@
                     this.searchRegex = Pattern.compile(s, regexFlags(caseSensitive));
                 } catch (PatternSyntaxException e) {
-                    throw new ParseError(tr(rxErrorMsg, e.getPattern(), e.getIndex(), e.getMessage()));
+                    throw new ParseError(tr(rxErrorMsg, e.getPattern(), e.getIndex(), e.getMessage()), e);
                 } catch (Exception e) {
-                    throw new ParseError(tr(rxErrorMsgNoPos, s, e.getMessage()));
+                    throw new ParseError(tr(rxErrorMsgNoPos, s, e.getMessage()), e);
                 }
                 this.search = s;
@@ -1171,4 +1171,7 @@
         public ParseError(String msg) {
             super(msg);
+        }
+        public ParseError(String msg, Throwable cause) {
+            super(msg, cause);
         }
         public ParseError(Token expected, Token found) {
Index: /trunk/src/org/openstreetmap/josm/data/Bounds.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/Bounds.java	(revision 6797)
+++ /trunk/src/org/openstreetmap/josm/data/Bounds.java	(revision 6798)
@@ -182,5 +182,5 @@
                 values[i] = Double.parseDouble(components[i]);
             } catch(NumberFormatException e) {
-                throw new IllegalArgumentException(MessageFormat.format("Illegal double value ''{0}''", components[i]));
+                throw new IllegalArgumentException(MessageFormat.format("Illegal double value ''{0}''", components[i]), e);
             }
         }
Index: /trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 6797)
+++ /trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 6798)
@@ -1189,7 +1189,7 @@
                 }
             } catch (IllegalArgumentException ex) {
-                throw new RuntimeException();
+                throw new RuntimeException(ex);
             } catch (IllegalAccessException ex) {
-                throw new RuntimeException();
+                throw new RuntimeException(ex);
             }
         }
@@ -1202,7 +1202,7 @@
             struct = klass.newInstance();
         } catch (InstantiationException ex) {
-            throw new RuntimeException();
+            throw new RuntimeException(ex);
         } catch (IllegalAccessException ex) {
-            throw new RuntimeException();
+            throw new RuntimeException(ex);
         }
         for (Entry<String,String> key_value : hash.entrySet()) {
@@ -1214,5 +1214,5 @@
                 continue;
             } catch (SecurityException ex) {
-                throw new RuntimeException();
+                throw new RuntimeException(ex);
             }
             if (f.getAnnotation(pref.class) == null) {
@@ -1242,7 +1242,7 @@
                 f.set(struct, value);
             } catch (IllegalArgumentException ex) {
-                throw new AssertionError();
+                throw new AssertionError(ex);
             } catch (IllegalAccessException ex) {
-                throw new RuntimeException();
+                throw new RuntimeException(ex);
             }
         }
Index: /trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java	(revision 6797)
+++ /trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java	(revision 6798)
@@ -113,5 +113,5 @@
                 update(null);
             } catch (ProjectionConfigurationException ex1) {
-                throw new RuntimeException();
+                throw new RuntimeException(ex1);
             }
         }
@@ -201,5 +201,5 @@
                 initp = parseParameterList(init);
             } catch (ProjectionConfigurationException ex) {
-                throw new ProjectionConfigurationException(tr(initKey+": "+ex.getMessage()));
+                throw new ProjectionConfigurationException(tr(initKey+": "+ex.getMessage()), ex);
             }
             for (Map.Entry<String, String> e : parameters.entrySet()) {
@@ -292,5 +292,5 @@
                 towgs84Param.add(Double.parseDouble(str));
             } catch (NumberFormatException e) {
-                throw new ProjectionConfigurationException(tr("Unable to parse value of parameter ''towgs84'' (''{0}'')", str));
+                throw new ProjectionConfigurationException(tr("Unable to parse value of parameter ''towgs84'' (''{0}'')", str), e);
             }
         }
@@ -380,5 +380,5 @@
         } catch (NumberFormatException e) {
             throw new ProjectionConfigurationException(
-                    tr("Unable to parse value ''{1}'' of parameter ''{0}'' as number.", parameterName, doubleStr));
+                    tr("Unable to parse value ''{1}'' of parameter ''{0}'' as number.", parameterName, doubleStr), e);
         }
     }
Index: /trunk/src/org/openstreetmap/josm/gui/FileDrop.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/FileDrop.java	(revision 6797)
+++ /trunk/src/org/openstreetmap/josm/gui/FileDrop.java	(revision 6798)
@@ -297,5 +297,5 @@
 
     // BEGIN 2007-09-12 Nathan Blomquist -- Linux (KDE/Gnome) support added.
-    private static String ZERO_CHAR_STRING = "" + (char)0;
+    private static final String ZERO_CHAR_STRING = "" + (char)0;
     private static File[] createFileArray(BufferedReader bReader)
     {
Index: /trunk/src/org/openstreetmap/josm/gui/MapStatus.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MapStatus.java	(revision 6797)
+++ /trunk/src/org/openstreetmap/josm/gui/MapStatus.java	(revision 6798)
@@ -784,9 +784,6 @@
         lonText.setInheritsPopupMenu(true);
         headingText.setInheritsPopupMenu(true);
-        //angleText.setInheritsPopupMenu(true);
         distText.setInheritsPopupMenu(true);
         nameText.setInheritsPopupMenu(true);
-        //helpText.setInheritsPopupMenu(true);
-        //progressBar.setInheritsPopupMenu(true);
 
         add(latText, GBC.std());
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java	(revision 6797)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java	(revision 6798)
@@ -1628,5 +1628,4 @@
             putValue(SHORT_DESCRIPTION, tr("Edit the relation the currently selected relation member refers to"));
             putValue(SMALL_ICON, ImageProvider.get("dialogs", "edit"));
-            //putValue(NAME, tr("Edit"));
             refreshEnabled();
         }
Index: /trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java	(revision 6797)
+++ /trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java	(revision 6798)
@@ -55,4 +55,7 @@
 import org.openstreetmap.josm.tools.WindowGeometry;
 
+/**
+ * Help browser displaying HTML pages fetched from JOSM wiki.
+ */
 public class HelpBrowser extends JDialog {
     /** the unique instance */
@@ -425,5 +428,4 @@
     class OpenInBrowserAction extends AbstractAction {
         public OpenInBrowserAction() {
-            //putValue(NAME, tr("Open in Browser"));
             putValue(SHORT_DESCRIPTION, tr("Open the current help page in an external browser"));
             putValue(SMALL_ICON, ImageProvider.get("help", "internet"));
@@ -438,5 +440,4 @@
     class EditAction extends AbstractAction {
         public EditAction() {
-            // putValue(NAME, tr("Edit"));
             putValue(SHORT_DESCRIPTION, tr("Edit the current help page"));
             putValue(SMALL_ICON,ImageProvider.get("dialogs", "edit"));
Index: /trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java	(revision 6797)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java	(revision 6798)
@@ -272,9 +272,7 @@
     static int checkMaxZoomLvl(int maxZoomLvl, TileSource ts) {
         if(maxZoomLvl > MAX_ZOOM) {
-            /*Main.debug("Max. zoom level should not be more than 30! Setting to 30.");*/
             maxZoomLvl = MAX_ZOOM;
         }
         if(maxZoomLvl < PROP_MIN_ZOOM_LVL.get()) {
-            /*Main.debug("Max. zoom level should not be more than min. zoom level! Setting to min.");*/
             maxZoomLvl = PROP_MIN_ZOOM_LVL.get();
         }
Index: /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 6797)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 6798)
@@ -919,5 +919,5 @@
                         timezone = parseTimezone(zone);
                     } catch (ParseException pe) {
-                        throw new RuntimeException();
+                        throw new RuntimeException(pe);
                     }
                     delta = sldMinutes.getValue()*60 + sldSeconds.getValue();
Index: /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageEntry.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageEntry.java	(revision 6797)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageEntry.java	(revision 6798)
@@ -191,5 +191,5 @@
             c = super.clone();
         } catch (CloneNotSupportedException e) {
-            throw new RuntimeException();
+            throw new RuntimeException(e);
         }
         return (ImageEntry) c;
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java	(revision 6797)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java	(revision 6798)
@@ -1107,6 +1107,4 @@
     }
 
-    private static DataFlavor ACTION_FLAVOR = new DataFlavor(
-            ActionDefinition.class, "ActionItem");
-
+    private static final DataFlavor ACTION_FLAVOR = new DataFlavor(ActionDefinition.class, "ActionItem");
 }
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java	(revision 6797)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java	(revision 6798)
@@ -61,8 +61,8 @@
     // independent from the keyboard's labelling. But the operation system's locale
     // usually matches the keyboard. This even works with my English Windows and my German keyboard.
-    private static String SHIFT = KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.SHIFT_DOWN_MASK).getModifiers());
-    private static String CTRL  = KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.CTRL_DOWN_MASK).getModifiers());
-    private static String ALT   = KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.ALT_DOWN_MASK).getModifiers());
-    private static String META  = KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.META_DOWN_MASK).getModifiers());
+    private static final String SHIFT = KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.SHIFT_DOWN_MASK).getModifiers());
+    private static final String CTRL  = KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.CTRL_DOWN_MASK).getModifiers());
+    private static final String ALT   = KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.ALT_DOWN_MASK).getModifiers());
+    private static final String META  = KeyEvent.getKeyModifiersText(KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.META_DOWN_MASK).getModifiers());
 
     // A list of keys to present the user. Sadly this really is a list of keys Java knows about,
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java	(revision 6797)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java	(revision 6798)
@@ -1362,5 +1362,5 @@
                 result.add(presetType);
             } catch (IllegalArgumentException e) {
-                throw new SAXException(tr("Unknown type: {0}", type));
+                throw new SAXException(tr("Unknown type: {0}", type), e);
             }
         }
Index: /trunk/src/org/openstreetmap/josm/io/GpxImporter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/GpxImporter.java	(revision 6797)
+++ /trunk/src/org/openstreetmap/josm/io/GpxImporter.java	(revision 6798)
@@ -86,5 +86,5 @@
         } catch (SAXException e) {
             Main.error(e);
-            throw new IOException(tr("Parsing data for layer ''{0}'' failed", fileName));
+            throw new IOException(tr("Parsing data for layer ''{0}'' failed", fileName), e);
         }
     }
@@ -161,5 +161,5 @@
         } catch (SAXException e) {
             Main.error(e);
-            throw new IOException(tr("Parsing data for layer ''{0}'' failed", gpxLayerName));
+            throw new IOException(tr("Parsing data for layer ''{0}'' failed", gpxLayerName), e);
         }
     }
Index: /trunk/src/org/openstreetmap/josm/io/NMEAImporter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/NMEAImporter.java	(revision 6797)
+++ /trunk/src/org/openstreetmap/josm/io/NMEAImporter.java	(revision 6798)
@@ -25,11 +25,15 @@
             "nmea,nme,nma,log,txt", "nmea", tr("NMEA-0183 Files") + " (*.nmea *.nme *.nma *.log *.txt)");
 
+    /**
+     * Constructs a new {@code NMEAImporter}.
+     */
     public NMEAImporter() {
         super(FILE_FILTER);
     }
 
-    @Override public void importData(File file, ProgressMonitor progressMonitor) throws IOException {
+    @Override
+    public void importData(File file, ProgressMonitor progressMonitor) throws IOException {
         final String fn = file.getName();
-        final NmeaReader r = new NmeaReader(new FileInputStream(file), file.getAbsoluteFile().getParentFile());
+        final NmeaReader r = new NmeaReader(new FileInputStream(file));
         if (r.getNumberOfCoordinates() > 0) {
             r.data.storageFile = file;
Index: /trunk/src/org/openstreetmap/josm/io/NmeaReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/NmeaReader.java	(revision 6797)
+++ /trunk/src/org/openstreetmap/josm/io/NmeaReader.java	(revision 6798)
@@ -3,5 +3,4 @@
 
 import java.io.BufferedReader;
-import java.io.File;
 import java.io.InputStream;
 import java.io.InputStreamReader;
@@ -170,5 +169,5 @@
     }
 
-    public NmeaReader(InputStream source, File relativeMarkerPath) {
+    public NmeaReader(InputStream source) {
 
         // create the data tree
Index: /trunk/src/org/openstreetmap/josm/io/OsmImporter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmImporter.java	(revision 6797)
+++ /trunk/src/org/openstreetmap/josm/io/OsmImporter.java	(revision 6798)
@@ -44,4 +44,7 @@
     }
 
+    /**
+     * Constructs a new {@code OsmImporter}.
+     */
     public OsmImporter() {
         super(FILE_FILTER);
@@ -65,5 +68,5 @@
         } catch (FileNotFoundException e) {
             Main.error(e);
-            throw new IOException(tr("File ''{0}'' does not exist.", file.getName()));
+            throw new IOException(tr("File ''{0}'' does not exist.", file.getName()), e);
         } finally {
             Utils.close(in);
Index: /trunk/src/org/openstreetmap/josm/io/imagery/HTMLGrabber.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/imagery/HTMLGrabber.java	(revision 6797)
+++ /trunk/src/org/openstreetmap/josm/io/imagery/HTMLGrabber.java	(revision 6798)
@@ -45,5 +45,5 @@
             browser = builder.start();
         } catch (IOException ioe) {
-            throw new IOException( "Could not start browser. Please check that the executable path is correct.\n" + ioe.getMessage() );
+            throw new IOException("Could not start browser. Please check that the executable path is correct.\n" + ioe.getMessage(), ioe);
         }
 
Index: /trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java	(revision 6797)
+++ /trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java	(revision 6798)
@@ -301,5 +301,5 @@
                         tags = URLDecoder.decode(args.get("addtags"), "UTF-8").split("\\|");
                     } catch (UnsupportedEncodingException e) {
-                        throw new RuntimeException();
+                        throw new RuntimeException(e);
                     }
                     Set<String> tagSet = new HashSet<String>();
Index: /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandler.java	(revision 6797)
+++ /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandler.java	(revision 6798)
@@ -37,5 +37,5 @@
             Main.warn("RemoteControl: Error parsing import remote control request:");
             Main.error(ex);
-            throw new RequestHandlerErrorException();
+            throw new RequestHandlerErrorException(ex);
         }
     }
@@ -118,5 +118,5 @@
             url = new URL(urlString);
         } catch (MalformedURLException e) {
-            throw new RequestHandlerBadRequestException("MalformedURLException: "+e.getMessage());
+            throw new RequestHandlerBadRequestException("MalformedURLException: "+e.getMessage(), e);
         }
         // Find download tasks for the given URL
Index: /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java	(revision 6797)
+++ /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java	(revision 6798)
@@ -137,5 +137,5 @@
             Main.warn("RemoteControl: Error parsing load_and_zoom remote control request:");
             Main.error(ex);
-            throw new RequestHandlerErrorException();
+            throw new RequestHandlerErrorException(ex);
         }
 
Index: /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java	(revision 6797)
+++ /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java	(revision 6798)
@@ -276,5 +276,5 @@
             return URLDecoder.decode(param, "UTF-8");
         } catch (UnsupportedEncodingException e) {
-            throw new RuntimeException();
+            throw new RuntimeException(e);
         }
     }
@@ -289,5 +289,10 @@
             super(message);
         }
-
+        public RequestHandlerException(String message, Throwable cause) {
+            super(message, cause);
+        }
+        public RequestHandlerException(Throwable cause) {
+            super(cause);
+        }
         public RequestHandlerException() {
         }
@@ -295,4 +300,7 @@
 
     public static class RequestHandlerErrorException extends RequestHandlerException {
+        public RequestHandlerErrorException(Throwable cause) {
+            super(cause);
+        }
     }
 
@@ -302,4 +310,7 @@
             super(message);
         }
+        public RequestHandlerBadRequestException(String message, Throwable cause) {
+            super(message, cause);
+        }
     }
 
Index: /trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 6797)
+++ /trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 6798)
@@ -480,5 +480,5 @@
             md = MessageDigest.getInstance("MD5");
         } catch (NoSuchAlgorithmException e) {
-            throw new RuntimeException();
+            throw new RuntimeException(e);
         }
         byte[] byteDigest = md.digest(byteData);
