Index: /trunk/src/org/openstreetmap/josm/Main.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/Main.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/Main.java	(revision 10212)
@@ -35,4 +35,5 @@
 import java.util.StringTokenizer;
 import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
@@ -106,4 +107,6 @@
 import org.openstreetmap.josm.io.OnlineResource;
 import org.openstreetmap.josm.io.OsmApi;
+import org.openstreetmap.josm.io.OsmApiInitializationException;
+import org.openstreetmap.josm.io.OsmTransferCanceledException;
 import org.openstreetmap.josm.plugins.PluginHandler;
 import org.openstreetmap.josm.tools.CheckParameterUtil;
@@ -594,5 +597,5 @@
                 try {
                     OsmApi.getOsmApi().initialize(null, true);
-                } catch (Exception e) {
+                } catch (OsmTransferCanceledException | OsmApiInitializationException e) {
                     Main.warn(getErrorMessage(Utils.getRootCause(e)));
                 }
@@ -640,5 +643,5 @@
             }
             service.shutdown();
-        } catch (Exception ex) {
+        } catch (InterruptedException | ExecutionException ex) {
             throw new RuntimeException(ex);
         }
@@ -933,43 +936,44 @@
         ProjectionPreference.setProjection();
 
+        String defaultlaf = platform.getDefaultStyle();
+        String laf = Main.pref.get("laf", defaultlaf);
         try {
-            String defaultlaf = platform.getDefaultStyle();
-            String laf = Main.pref.get("laf", defaultlaf);
-            try {
-                UIManager.setLookAndFeel(laf);
-            } catch (final NoClassDefFoundError | ClassNotFoundException e) {
-                // Try to find look and feel in plugin classloaders
-                Class<?> klass = null;
-                for (ClassLoader cl : PluginHandler.getResourceClassLoaders()) {
-                    try {
-                        klass = cl.loadClass(laf);
-                        break;
-                    } catch (ClassNotFoundException ex) {
-                        // Do nothing
-                        if (Main.isTraceEnabled()) {
-                            Main.trace(ex.getMessage());
-                        }
+            UIManager.setLookAndFeel(laf);
+        } catch (final NoClassDefFoundError | ClassNotFoundException e) {
+            // Try to find look and feel in plugin classloaders
+            Class<?> klass = null;
+            for (ClassLoader cl : PluginHandler.getResourceClassLoaders()) {
+                try {
+                    klass = cl.loadClass(laf);
+                    break;
+                } catch (ClassNotFoundException ex) {
+                    if (Main.isTraceEnabled()) {
+                        Main.trace(ex.getMessage());
                     }
                 }
-                if (klass != null && LookAndFeel.class.isAssignableFrom(klass)) {
-                    try {
-                        UIManager.setLookAndFeel((LookAndFeel) klass.getConstructor().newInstance());
-                    } catch (ReflectiveOperationException ex) {
-                        warn("Cannot set Look and Feel: " + laf + ": "+ex.getMessage());
-                    }
-                } else {
-                    info("Look and Feel not found: " + laf);
+            }
+            if (klass != null && LookAndFeel.class.isAssignableFrom(klass)) {
+                try {
+                    UIManager.setLookAndFeel((LookAndFeel) klass.getConstructor().newInstance());
+                } catch (ReflectiveOperationException ex) {
+                    warn("Cannot set Look and Feel: " + laf + ": "+ex.getMessage());
+                } catch (UnsupportedLookAndFeelException ex) {
+                    info("Look and Feel not supported: " + laf);
                     Main.pref.put("laf", defaultlaf);
                 }
-            } catch (final UnsupportedLookAndFeelException e) {
-                info("Look and Feel not supported: " + laf);
+            } else {
+                info("Look and Feel not found: " + laf);
                 Main.pref.put("laf", defaultlaf);
             }
-            toolbar = new ToolbarPreferences();
-            contentPanePrivate.updateUI();
-            panel.updateUI();
-        } catch (final Exception e) {
+        } catch (UnsupportedLookAndFeelException e) {
+            info("Look and Feel not supported: " + laf);
+            Main.pref.put("laf", defaultlaf);
+        } catch (InstantiationException | IllegalAccessException e) {
             error(e);
         }
+        toolbar = new ToolbarPreferences();
+        contentPanePrivate.updateUI();
+        panel.updateUI();
+
         UIManager.put("OptionPane.okIcon", ImageProvider.get("ok"));
         UIManager.put("OptionPane.yesIcon", UIManager.get("OptionPane.okIcon"));
Index: /trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java	(revision 10212)
@@ -54,23 +54,19 @@
 
         // change toolbar icon from if specified
-        try {
-            String icon = info.getIcon();
-            if (icon != null) {
-                new ImageProvider(icon).setOptional(true).getInBackground(new ImageResourceCallback() {
-                            @Override
-                            public void finished(final ImageResource result) {
-                                if (result != null) {
-                                    GuiHelper.runInEDT(new Runnable() {
-                                        @Override
-                                        public void run() {
-                                            result.getImageIcon(AddImageryLayerAction.this);
-                                        }
-                                    });
-                                }
+        String icon = info.getIcon();
+        if (icon != null) {
+            new ImageProvider(icon).setOptional(true).getInBackground(new ImageResourceCallback() {
+                        @Override
+                        public void finished(final ImageResource result) {
+                            if (result != null) {
+                                GuiHelper.runInEDT(new Runnable() {
+                                    @Override
+                                    public void run() {
+                                        result.getImageIcon(AddImageryLayerAction.this);
+                                    }
+                                });
                             }
-                        });
-            }
-        } catch (Exception ex) {
-            throw new RuntimeException(ex.getMessage(), ex);
+                        }
+                    });
         }
     }
Index: /trunk/src/org/openstreetmap/josm/actions/CloseChangesetAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/CloseChangesetAction.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/actions/CloseChangesetAction.java	(revision 10212)
@@ -137,5 +137,5 @@
                         getProgressMonitor().createSubTaskMonitor(1, false /* not internal */)
                 );
-            } catch (Exception e) {
+            } catch (OsmTransferException | IllegalArgumentException e) {
                 if (canceled)
                     return;
Index: /trunk/src/org/openstreetmap/josm/actions/JosmAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/JosmAction.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/actions/JosmAction.java	(revision 10212)
@@ -6,4 +6,6 @@
 import java.awt.event.KeyEvent;
 import java.util.Collection;
+import java.util.concurrent.CancellationException;
+import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
 
@@ -239,5 +241,5 @@
                         try {
                             future.get();
-                        } catch (Exception e) {
+                        } catch (InterruptedException | ExecutionException | CancellationException e) {
                             Main.error(e);
                             return;
Index: /trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java	(revision 10212)
@@ -25,4 +25,5 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
 
 import javax.swing.JOptionPane;
@@ -328,5 +329,5 @@
                             }
                         }
-                    } catch (Exception e) {
+                    } catch (IOException | PatternSyntaxException | IllegalStateException | IndexOutOfBoundsException e) {
                         Main.error(e);
                     }
Index: /trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java	(revision 10212)
@@ -153,5 +153,5 @@
                         result.add(task);
                     }
-                } catch (Exception e) {
+                } catch (ReflectiveOperationException e) {
                     Main.error(e);
                 }
@@ -173,5 +173,5 @@
                     DownloadTask task = taskClass.getConstructor().newInstance();
                     result.append(task.acceptsDocumentationSummary());
-                } catch (Exception e) {
+                } catch (ReflectiveOperationException e) {
                     Main.error(e);
                 }
Index: /trunk/src/org/openstreetmap/josm/actions/RestartAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/RestartAction.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/actions/RestartAction.java	(revision 10212)
@@ -79,40 +79,35 @@
 
     /**
-     * Restarts the current Java application
-     * @throws IOException in case of any error
+     * Restarts the current Java application.
+     * @throws IOException in case of any I/O error
      */
     public static void restartJOSM() throws IOException {
         if (isRestartSupported() && !Main.exitJosm(false, 0)) return;
         final List<String> cmd;
-        try {
-            // special handling for OSX .app package
-            if (Main.isPlatformOsx() && System.getProperty("java.library.path").contains("/JOSM.app/Contents/MacOS")) {
-                cmd = getAppleCommands();
-            } else {
-                cmd = getCommands();
-            }
-            Main.info("Restart "+cmd);
-            if (Main.isDebugEnabled() && Main.pref.getBoolean("restart.debug.simulation")) {
-                Main.debug("Restart cancelled to get debug info");
-                return;
-            }
-            // execute the command in a shutdown hook, to be sure that all the
-            // resources have been disposed before restarting the application
-            Runtime.getRuntime().addShutdownHook(new Thread("josm-restarter") {
-                @Override
-                public void run() {
-                    try {
-                        Runtime.getRuntime().exec(cmd.toArray(new String[cmd.size()]));
-                    } catch (IOException e) {
-                        Main.error(e);
-                    }
+        // special handling for OSX .app package
+        if (Main.isPlatformOsx() && System.getProperty("java.library.path").contains("/JOSM.app/Contents/MacOS")) {
+            cmd = getAppleCommands();
+        } else {
+            cmd = getCommands();
+        }
+        Main.info("Restart "+cmd);
+        if (Main.isDebugEnabled() && Main.pref.getBoolean("restart.debug.simulation")) {
+            Main.debug("Restart cancelled to get debug info");
+            return;
+        }
+        // execute the command in a shutdown hook, to be sure that all the
+        // resources have been disposed before restarting the application
+        Runtime.getRuntime().addShutdownHook(new Thread("josm-restarter") {
+            @Override
+            public void run() {
+                try {
+                    Runtime.getRuntime().exec(cmd.toArray(new String[cmd.size()]));
+                } catch (IOException e) {
+                    Main.error(e);
                 }
-            });
-            // exit
-            System.exit(0);
-        } catch (Exception e) {
-            // something went wrong
-            throw new IOException("Error while trying to restart the application", e);
-        }
+            }
+        });
+        // exit
+        System.exit(0);
     }
 
Index: /trunk/src/org/openstreetmap/josm/actions/SessionLoadAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/SessionLoadAction.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/actions/SessionLoadAction.java	(revision 10212)
@@ -183,5 +183,5 @@
             } catch (IOException e) {
                 handleException(tr("IO Error"), e);
-            } catch (Exception e) {
+            } catch (RuntimeException e) {
                 cancel();
                 throw e;
Index: /trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java	(revision 10212)
@@ -23,4 +23,5 @@
 import org.openstreetmap.josm.io.MultiFetchServerObjectReader;
 import org.openstreetmap.josm.io.OnlineResource;
+import org.openstreetmap.josm.io.OsmTransferException;
 import org.openstreetmap.josm.tools.Shortcut;
 
@@ -44,5 +45,5 @@
             DataSet ds = reader.parseOsm(NullProgressMonitor.INSTANCE);
             Main.main.getEditLayer().mergeFrom(ds);
-        } catch (Exception e) {
+        } catch (OsmTransferException e) {
             ExceptionDialogUtil.explainException(e);
         }
Index: /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java	(revision 10212)
@@ -115,12 +115,8 @@
                 ProgressMonitor subMonitor = progressMonitor.createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false);
                 rawData = reader.parseRawGps(subMonitor);
-            } catch (Exception e) {
+            } catch (OsmTransferException e) {
                 if (isCanceled())
                     return;
-                if (e instanceof OsmTransferException) {
-                    rememberException(e);
-                } else {
-                    rememberException(new OsmTransferException(e));
-                }
+                rememberException(e);
             }
         }
Index: /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadNotesTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadNotesTask.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadNotesTask.java	(revision 10212)
@@ -160,12 +160,8 @@
                                 + "</html>",
                         tr("More notes to download"), JOptionPane.INFORMATION_MESSAGE);
-            } catch (Exception e) {
+            } catch (OsmTransferException e) {
                 if (isCanceled())
                     return;
-                if (e instanceof OsmTransferException) {
-                    rememberException(e);
-                } else {
-                    rememberException(new OsmTransferException(e));
-                }
+                rememberException(e);
             }
         }
@@ -186,12 +182,8 @@
             try {
                 notesData = reader.parseRawNotes(subMonitor);
-            } catch (Exception e) {
+            } catch (OsmTransferException e) {
                 if (isCanceled())
                     return;
-                if (e instanceof OsmTransferException) {
-                    rememberException(e);
-                } else {
-                    rememberException(new OsmTransferException(e));
-                }
+                rememberException(e);
             }
         }
@@ -212,12 +204,8 @@
             try {
                 notesData = reader.parseRawNotesBzip2(subMonitor);
-            } catch (Exception e) {
+            } catch (OsmTransferException e) {
                 if (isCanceled())
                     return;
-                if (e instanceof OsmTransferException) {
-                    rememberException(e);
-                } else {
-                    rememberException(new OsmTransferException(e));
-                }
+                rememberException(e);
             }
         }
Index: /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java	(revision 10212)
@@ -332,5 +332,5 @@
                     return;
                 dataSet = parseDataSet();
-            } catch (Exception e) {
+            } catch (OsmTransferException e) {
                 if (isCanceled()) {
                     Main.info(tr("Ignoring exception because download has been canceled. Exception was: {0}", e.toString()));
@@ -340,8 +340,6 @@
                     setCanceled(true);
                     return;
-                } else if (e instanceof OsmTransferException) {
+                } else {
                     rememberException(e);
-                } else {
-                    rememberException(new OsmTransferException(e));
                 }
                 DownloadOsmTask.this.setFailed(true);
Index: /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadReferrersTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadReferrersTask.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadReferrersTask.java	(revision 10212)
@@ -194,5 +194,5 @@
                 i++;
             }
-        } catch (Exception e) {
+        } catch (OsmTransferException e) {
             if (canceled)
                 return;
Index: /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadTaskList.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadTaskList.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadTaskList.java	(revision 10212)
@@ -16,4 +16,6 @@
 import java.util.List;
 import java.util.Set;
+import java.util.concurrent.CancellationException;
+import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
 
@@ -249,5 +251,5 @@
                 try {
                     future.get();
-                } catch (Exception e) {
+                } catch (InterruptedException | ExecutionException | CancellationException e) {
                     Main.error(e);
                     return;
Index: /trunk/src/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandler.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandler.java	(revision 10212)
@@ -9,4 +9,6 @@
 import java.util.LinkedHashSet;
 import java.util.Set;
+import java.util.concurrent.CancellationException;
+import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
 
@@ -40,5 +42,5 @@
         try {
             future.get();
-        } catch (Exception e) {
+        } catch (InterruptedException | ExecutionException | CancellationException e) {
             Main.error(e);
             return;
Index: /trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 10212)
@@ -598,5 +598,5 @@
                 } catch (PatternSyntaxException e) {
                     throw new ParseError(tr(rxErrorMsg, e.getPattern(), e.getIndex(), e.getMessage()), e);
-                } catch (Exception e) {
+                } catch (IllegalArgumentException e) {
                     throw new ParseError(tr(rxErrorMsgNoPos, key, e.getMessage()), e);
                 }
@@ -605,5 +605,5 @@
                 } catch (PatternSyntaxException e) {
                     throw new ParseError(tr(rxErrorMsg, e.getPattern(), e.getIndex(), e.getMessage()), e);
-                } catch (Exception e) {
+                } catch (IllegalArgumentException e) {
                     throw new ParseError(tr(rxErrorMsgNoPos, value, e.getMessage()), e);
                 }
@@ -795,5 +795,5 @@
                 } catch (PatternSyntaxException e) {
                     throw new ParseError(tr(rxErrorMsg, e.getPattern(), e.getIndex(), e.getMessage()), e);
-                } catch (Exception e) {
+                } catch (IllegalArgumentException e) {
                     throw new ParseError(tr(rxErrorMsgNoPos, key, e.getMessage()), e);
                 }
@@ -806,5 +806,5 @@
                 } catch (PatternSyntaxException e) {
                     throw new ParseError(tr(rxErrorMsg, e.getPattern(), e.getIndex(), e.getMessage()), e);
-                } catch (Exception e) {
+                } catch (IllegalArgumentException e) {
                     throw new ParseError(tr(rxErrorMsgNoPos, value, e.getMessage()), e);
                 }
@@ -885,5 +885,5 @@
                 } catch (PatternSyntaxException e) {
                     throw new ParseError(tr(rxErrorMsg, e.getPattern(), e.getIndex(), e.getMessage()), e);
-                } catch (Exception e) {
+                } catch (IllegalArgumentException e) {
                     throw new ParseError(tr(rxErrorMsgNoPos, s, e.getMessage()), e);
                 }
Index: /trunk/src/org/openstreetmap/josm/actions/upload/UploadNotesTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/upload/UploadNotesTask.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/actions/upload/UploadNotesTask.java	(revision 10212)
@@ -117,5 +117,5 @@
                 }
                 updatedNotes.put(note, newNote);
-            } catch (Exception e) {
+            } catch (OsmTransferException e) {
                 Main.error("Failed to upload note to server: " + note.getId());
                 Main.error(e);
Index: /trunk/src/org/openstreetmap/josm/data/AutosaveTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/AutosaveTask.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/data/AutosaveTask.java	(revision 10212)
@@ -165,5 +165,5 @@
                     try (PrintStream ps = new PrintStream(pidFile, "UTF-8")) {
                         ps.println(ManagementFactory.getRuntimeMXBean().getName());
-                    } catch (Exception t) {
+                    } catch (IOException | SecurityException t) {
                         Main.error(t);
                     }
@@ -213,5 +213,5 @@
                     displayNotification();
                 }
-            } catch (Exception t) {
+            } catch (RuntimeException t) {
                 // Don't let exception stop time thread
                 Main.error("Autosave failed:");
@@ -312,5 +312,5 @@
                             skipFile = jvmPerfDataFileExists(pid);
                         }
-                    } catch (Exception t) {
+                    } catch (IOException | SecurityException t) {
                         Main.error(t);
                     }
Index: /trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java	(revision 10212)
@@ -10,4 +10,5 @@
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.IOException;
 import java.io.InputStream;
 import java.nio.charset.StandardCharsets;
@@ -35,7 +36,11 @@
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.stream.XMLStreamException;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
 import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.TransformerFactoryConfigurationError;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
@@ -53,8 +58,10 @@
 import org.openstreetmap.josm.tools.LanguageInfo;
 import org.openstreetmap.josm.tools.Utils;
+import org.w3c.dom.DOMException;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
 
 /**
@@ -270,8 +277,8 @@
             exportDocument = builder.newDocument();
             root = document.getDocumentElement();
-        } catch (Exception ex) {
+        } catch (SAXException | IOException | ParserConfigurationException ex) {
             Main.warn("Error getting preferences to save:" +ex.getMessage());
         }
-        if (root == null)
+        if (root == null || exportDocument == null)
             return;
         try {
@@ -299,5 +306,5 @@
             ts.setOutputProperty(OutputKeys.INDENT, "yes");
             ts.transform(new DOMSource(exportDocument), new StreamResult(f.toURI().getPath()));
-        } catch (Exception ex) {
+        } catch (DOMException | TransformerFactoryConfigurationError | TransformerException ex) {
             Main.warn("Error saving preferences part:");
             Main.error(ex);
@@ -451,5 +458,5 @@
                     openAndReadXML(is);
                 }
-            } catch (Exception ex) {
+            } catch (ScriptException | IOException | SecurityException ex) {
                 log("Error reading custom preferences: " + ex.getMessage());
             }
@@ -466,5 +473,5 @@
                     processXML(document);
                 }
-            } catch (Exception ex) {
+            } catch (SAXException | IOException | ParserConfigurationException ex) {
                 log("Error reading custom preferences: "+ex.getMessage());
             }
@@ -492,5 +499,5 @@
                 engine.eval("API.pluginUninstall = function(names) { "+className+".pluginOperation('',names,'');}");
                 engine.eval("API.pluginDelete = function(names) { "+className+".pluginOperation('','',names);}");
-            } catch (Exception ex) {
+            } catch (ScriptException ex) {
                 log("Error: initializing script engine: "+ex.getMessage());
                 Main.error(ex);
@@ -747,5 +754,5 @@
                 CharArrayReader reader = new CharArrayReader(fragmentWithReplacedVars.toCharArray());
                 tmpPref.fromXML(reader);
-            } catch (Exception ex) {
+            } catch (TransformerException | XMLStreamException | IOException ex) {
                 log("Error: can not read XML fragment :" + ex.getMessage());
             }
Index: /trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 10212)
@@ -731,19 +731,11 @@
     /* only for preferences */
     public synchronized String getColorName(String o) {
-        try {
-            Matcher m = Pattern.compile("mappaint\\.(.+?)\\.(.+)").matcher(o);
-            if (m.matches()) {
-                return tr("Paint style {0}: {1}", tr(I18n.escape(m.group(1))), tr(I18n.escape(m.group(2))));
-            }
-        } catch (Exception e) {
-            Main.warn(e);
-        }
-        try {
-            Matcher m = Pattern.compile("layer (.+)").matcher(o);
-            if (m.matches()) {
-                return tr("Layer: {0}", tr(I18n.escape(m.group(1))));
-            }
-        } catch (Exception e) {
-            Main.warn(e);
+        Matcher m = Pattern.compile("mappaint\\.(.+?)\\.(.+)").matcher(o);
+        if (m.matches()) {
+            return tr("Paint style {0}: {1}", tr(I18n.escape(m.group(1))), tr(I18n.escape(m.group(2))));
+        }
+        m = Pattern.compile("layer (.+)").matcher(o);
+        if (m.matches()) {
+            return tr("Layer: {0}", tr(I18n.escape(m.group(1))));
         }
         return tr(I18n.escape(colornames.containsKey(o) ? colornames.get(o) : o));
@@ -1336,8 +1328,5 @@
                 field.setAccessible(true);
                 field.set(null, ResourceBundle.getBundle("sun.awt.resources.awt"));
-            } catch (Exception | InternalError e) {
-                // Ignore all exceptions, including internal error raised by Java 9 Jigsaw EA:
-                // java.lang.InternalError: legacy getBundle can't be used to find sun.awt.resources.awt in module java.desktop
-                // InternalError catch to remove when https://bugs.openjdk.java.net/browse/JDK-8136804 is resolved
+            } catch (ReflectiveOperationException e) {
                 if (Main.isTraceEnabled()) {
                     Main.trace(e.getMessage());
Index: /trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java	(revision 10212)
@@ -297,5 +297,4 @@
      * @return true if object was successfully downloaded, false, if there was a loading failure
      */
-
     private boolean loadObject() {
         if (attributes == null) {
@@ -396,5 +395,5 @@
             }
             return doCache;
-        } catch (Exception e) {
+        } catch (InterruptedException e) {
             attributes.setErrorMessage(e.toString());
             log.log(Level.WARNING, "JCS - Exception during download {0}",  getUrlNoException());
@@ -403,5 +402,4 @@
         log.log(Level.WARNING, "JCS - Silent failure during download: {0}", getUrlNoException());
         return false;
-
     }
 
Index: /trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java	(revision 10212)
@@ -12,4 +12,5 @@
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.projection.Projections;
+import org.openstreetmap.josm.tools.UncheckedParseException;
 import org.openstreetmap.josm.tools.date.DateUtils;
 import org.openstreetmap.josm.tools.template_engine.TemplateEngineDataProvider;
@@ -124,5 +125,5 @@
                 this.time = time.getTime() / 1000.;
                 return time;
-            } catch (Exception e) {
+            } catch (UncheckedParseException e) {
                 Main.warn(e);
                 time = 0;
Index: /trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java	(revision 10212)
@@ -665,14 +665,10 @@
 
         if (serverProjections == null || serverProjections.isEmpty()) {
-            try {
-                serverProjections = new ArrayList<>();
-                Matcher m = Pattern.compile(".*\\{PROJ\\(([^)}]+)\\)\\}.*").matcher(url.toUpperCase(Locale.ENGLISH));
-                if (m.matches()) {
-                    for (String p : m.group(1).split(",")) {
-                        serverProjections.add(p);
-                    }
+            serverProjections = new ArrayList<>();
+            Matcher m = Pattern.compile(".*\\{PROJ\\(([^)}]+)\\)\\}.*").matcher(url.toUpperCase(Locale.ENGLISH));
+            if (m.matches()) {
+                for (String p : m.group(1).split(",")) {
+                    serverProjections.add(p);
                 }
-            } catch (Exception e) {
-                Main.warn(e);
             }
         }
Index: /trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java	(revision 10212)
@@ -152,5 +152,5 @@
         try {
             super.submit(this, force);
-        } catch (Exception e) {
+        } catch (IOException e) {
             // if we fail to submit the job, mark tile as loaded and set error message
             tile.finishLoading();
Index: /trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java	(revision 10212)
@@ -252,4 +252,5 @@
      * @param info imagery info
      * @throws IOException if any I/O error occurs
+     * @throws IllegalArgumentException if any other error happens for the given imagery info
      */
     public WMTSTileSource(ImageryInfo info) throws IOException {
@@ -290,5 +291,10 @@
     }
 
-    private Collection<Layer> getCapabilities() {
+    /**
+     * @return capabilities
+     * @throws IOException in case of any I/O error
+     * @throws IllegalArgumentException in case of any other error
+     */
+    private Collection<Layer> getCapabilities() throws IOException {
         XMLInputFactory factory = XMLInputFactory.newFactory();
         // do not try to load external entities, nor validate the XML
@@ -320,5 +326,5 @@
             }
             return ret;
-        } catch (Exception e) {
+        } catch (XMLStreamException e) {
             throw new IllegalArgumentException(e);
         }
Index: /trunk/src/org/openstreetmap/josm/data/osm/DatasetConsistencyTest.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/DatasetConsistencyTest.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/data/osm/DatasetConsistencyTest.java	(revision 10212)
@@ -212,5 +212,5 @@
             }
 
-        } catch (Exception e) {
+        } catch (RuntimeException e) {
             writer.println("Exception during dataset integrity test:");
             e.printStackTrace(writer);
Index: /trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java	(revision 10212)
@@ -814,5 +814,5 @@
                         }
                     }
-                } catch (Exception e) {
+                } catch (RuntimeException e) {
                     Main.error(e);
                 }
Index: /trunk/src/org/openstreetmap/josm/data/projection/Projections.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/projection/Projections.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/data/projection/Projections.java	(revision 10212)
@@ -323,5 +323,5 @@
             try {
                 proj = pc.getProjection();
-            } catch (Exception e) {
+            } catch (RuntimeException e) {
                 String cause = e.getMessage();
                 Main.warn("Unable to get projection "+code+" with "+pc + (cause != null ? ". "+cause : ""));
Index: /trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFileWrapper.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFileWrapper.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFileWrapper.java	(revision 10212)
@@ -2,4 +2,5 @@
 package org.openstreetmap.josm.data.projection.datum;
 
+import java.io.IOException;
 import java.io.InputStream;
 
@@ -55,5 +56,5 @@
                 instance = new NTV2GridShiftFile();
                 instance.loadGridShiftFile(is, false);
-            } catch (Exception e) {
+            } catch (IOException e) {
                 throw new RuntimeException(e);
             }
Index: /trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java	(revision 10212)
@@ -162,14 +162,10 @@
 
     /**
-     * Check if plugin directory exists (store ignored errors file)
+     * Check if validator directory exists (store ignored errors file)
      */
     private static void checkValidatorDir() {
-        try {
-            File pathDir = new File(getValidatorDir());
-            if (!pathDir.exists()) {
-                Utils.mkDirs(pathDir);
-            }
-        } catch (Exception e) {
-            Main.error(e);
+        File pathDir = new File(getValidatorDir());
+        if (!pathDir.exists()) {
+            Utils.mkDirs(pathDir);
         }
     }
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 10212)
@@ -750,5 +750,5 @@
                 Main.warn(tr("Failed to add {0} to tag checker", i));
                 Main.warn(ex, false);
-            } catch (Exception ex) {
+            } catch (ParseException ex) {
                 Main.warn(tr("Failed to add {0} to tag checker", i));
                 Main.warn(ex);
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java	(revision 10212)
@@ -207,6 +207,6 @@
             try {
                 prettifiedValue = (String) ((Invocable) ENGINE).invokeMethod(r, "prettifyValue");
-            } catch (Exception e) {
-                Main.debug(e.getMessage());
+            } catch (ScriptException | NoSuchMethodException e) {
+                Main.warn(e);
             }
             for (final Object i : getList(((Invocable) ENGINE).invokeMethod(r, "getErrors"))) {
Index: /trunk/src/org/openstreetmap/josm/gui/FileDrop.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/FileDrop.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/FileDrop.java	(revision 10212)
@@ -23,4 +23,5 @@
 import java.io.Reader;
 import java.net.URI;
+import java.net.URISyntaxException;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -34,4 +35,5 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.OpenFileAction;
+import org.openstreetmap.josm.gui.FileDrop.TransferableObject;
 
 // CHECKSTYLE.OFF: HideUtilityClassConstructor
@@ -138,5 +140,5 @@
         try {
             List<File> list = new ArrayList<>();
-            String line = null;
+            String line;
             while ((line = bReader.readLine()) != null) {
                 try {
@@ -146,7 +148,6 @@
                     }
 
-                    File file = new File(new URI(line));
-                    list.add(file);
-                } catch (Exception ex) {
+                    list.add(new File(new URI(line)));
+                } catch (URISyntaxException ex) {
                     Main.warn("Error with " + line + ": " + ex.getMessage());
                 }
Index: /trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java	(revision 10212)
@@ -66,5 +66,5 @@
                 try {
                     instance.initFromOAuth();
-                } catch (Exception e) {
+                } catch (RuntimeException e) {
                     Main.error(e);
                     // Fall back to preferences if OAuth identification fails for any reason
@@ -304,9 +304,5 @@
             accessTokenSecretChanged = false;
             if (OsmApi.isUsingOAuth()) {
-                try {
-                    getInstance().initFromOAuth();
-                } catch (Exception e) {
-                    Main.error(e);
-                }
+                getInstance().initFromOAuth();
             }
         }
Index: /trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 10212)
@@ -403,5 +403,5 @@
                 try (InputStream is = HttpClient.create(new URL(i)).connect().getContent()) {
                     config.openAndReadXML(is);
-                } catch (Exception ex) {
+                } catch (IOException ex) {
                     throw new RuntimeException(ex);
                 }
Index: /trunk/src/org/openstreetmap/josm/gui/MapStatus.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MapStatus.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/MapStatus.java	(revision 10212)
@@ -1097,5 +1097,5 @@
             try {
                 thread.interrupt();
-            } catch (Exception e) {
+            } catch (RuntimeException e) {
                 Main.error(e);
             }
Index: /trunk/src/org/openstreetmap/josm/gui/PleaseWaitRunnable.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/PleaseWaitRunnable.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/PleaseWaitRunnable.java	(revision 10212)
@@ -5,4 +5,5 @@
 import java.awt.EventQueue;
 import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
 
 import javax.swing.SwingUtilities;
@@ -122,5 +123,6 @@
                 }
             }
-        } catch (final Exception e) {
+        } catch (final RuntimeException |
+                OsmTransferException | IOException | SAXException | InvocationTargetException | InterruptedException e) {
             if (!ignoreException) {
                 // Exception has to thrown in EDT to be shown to user
Index: /trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java	(revision 10212)
@@ -199,20 +199,16 @@
     @Override
     public void paint(Graphics g) {
-        try {
-            super.paint(g);
-
-            // draw selection rectangle
-            if (iSelectionRectStart != null && iSelectionRectEnd != null) {
-                Rectangle box = new Rectangle(getMapPosition(iSelectionRectStart, false));
-                box.add(getMapPosition(iSelectionRectEnd, false));
-
-                g.setColor(new Color(0.9f, 0.7f, 0.7f, 0.6f));
-                g.fillRect(box.x, box.y, box.width, box.height);
-
-                g.setColor(Color.BLACK);
-                g.drawRect(box.x, box.y, box.width, box.height);
-            }
-        } catch (Exception e) {
-            Main.error(e);
+        super.paint(g);
+
+        // draw selection rectangle
+        if (iSelectionRectStart != null && iSelectionRectEnd != null) {
+            Rectangle box = new Rectangle(getMapPosition(iSelectionRectStart, false));
+            box.add(getMapPosition(iSelectionRectEnd, false));
+
+            g.setColor(new Color(0.9f, 0.7f, 0.7f, 0.6f));
+            g.fillRect(box.x, box.y, box.width, box.height);
+
+            g.setColor(Color.BLACK);
+            g.drawRect(box.x, box.y, box.width, box.height);
         }
     }
Index: /trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java	(revision 10212)
@@ -45,5 +45,4 @@
 import org.openstreetmap.gui.jmapviewer.interfaces.MapMarker;
 import org.openstreetmap.gui.jmapviewer.interfaces.TileLoader;
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.data.Version;
@@ -694,24 +693,20 @@
         @Override
         public void paint(Graphics g) {
-            try {
-                super.paint(g);
-                if (min == null || max == null) return;
-                int zoomDiff = MAX_ZOOM - zoom;
-                Point tlc = getTopLeftCoordinates();
-                int xMin = (min.x >> zoomDiff) - tlc.x;
-                int yMin = (min.y >> zoomDiff) - tlc.y;
-                int xMax = (max.x >> zoomDiff) - tlc.x;
-                int yMax = (max.y >> zoomDiff) - tlc.y;
-
-                int w = xMax - xMin;
-                int h = yMax - yMin;
-                g.setColor(new Color(0.9f, 0.7f, 0.7f, 0.6f));
-                g.fillRect(xMin, yMin, w, h);
-
-                g.setColor(Color.BLACK);
-                g.drawRect(xMin, yMin, w, h);
-            } catch (Exception e) {
-                Main.error(e);
-            }
+            super.paint(g);
+            if (min == null || max == null) return;
+            int zoomDiff = MAX_ZOOM - zoom;
+            Point tlc = getTopLeftCoordinates();
+            int xMin = (min.x >> zoomDiff) - tlc.x;
+            int yMin = (min.y >> zoomDiff) - tlc.y;
+            int xMax = (max.x >> zoomDiff) - tlc.x;
+            int yMax = (max.y >> zoomDiff) - tlc.y;
+
+            int w = xMax - xMin;
+            int h = yMax - yMin;
+            g.setColor(new Color(0.9f, 0.7f, 0.7f, 0.6f));
+            g.fillRect(xMin, yMin, w, h);
+
+            g.setColor(Color.BLACK);
+            g.drawRect(xMin, yMin, w, h);
         }
     }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentPanel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentPanel.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentPanel.java	(revision 10212)
@@ -235,5 +235,5 @@
                         });
                     }
-                } catch (final Exception e) {
+                } catch (final RuntimeException e) {
                     GuiHelper.runInEDT(new Runnable() {
                         @Override
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 10212)
@@ -16,4 +16,5 @@
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
+import java.io.IOException;
 import java.net.URI;
 import java.net.URISyntaxException;
@@ -1216,5 +1217,5 @@
                                 }
                             }
-                        } catch (Exception e) {
+                        } catch (URISyntaxException | IOException e) {
                             Main.error(e);
                         }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java	(revision 10212)
@@ -426,5 +426,5 @@
                     }
                 });
-            } catch (Exception e) {
+            } catch (OsmTransferException e) {
                 if (canceled) {
                     Main.warn(tr("Ignoring exception because task was canceled. Exception: {0}", e.toString()));
@@ -475,5 +475,5 @@
                     refreshView(r);
                 }
-            } catch (Exception e) {
+            } catch (OsmTransferException e) {
                 if (canceled) {
                     Main.warn(tr("Ignoring exception because task was canceled. Exception: {0}", e.toString()));
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationMemberTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationMemberTask.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationMemberTask.java	(revision 10212)
@@ -143,5 +143,5 @@
             );
 
-        } catch (Exception e) {
+        } catch (OsmTransferException e) {
             if (canceled) {
                 Main.warn(tr("Ignoring exception because task was canceled. Exception: {0}", e.toString()));
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationTask.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationTask.java	(revision 10212)
@@ -5,4 +5,5 @@
 
 import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
 import java.util.Collection;
 
@@ -107,5 +108,5 @@
                     }
             );
-        } catch (Exception e) {
+        } catch (OsmTransferException | InvocationTargetException | InterruptedException e) {
             if (canceled) {
                 Main.warn(tr("Ignoring exception because task was canceled. Exception: {0}", e.toString()));
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTransferHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTransferHandler.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTransferHandler.java	(revision 10212)
@@ -54,5 +54,5 @@
                 importPrimitiveData(support, destination, insertRow);
             }
-        } catch (Exception e) {
+        } catch (IOException | UnsupportedFlavorException e) {
             Main.warn(e);
             return false;
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java	(revision 10212)
@@ -188,5 +188,5 @@
                 );
             }
-        } catch (Exception e) {
+        } catch (OsmTransferException e) {
             if (canceled) {
                 Main.warn(tr("Ignoring exception because task was canceled. Exception: {0}", e.toString()));
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditor.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditor.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditor.java	(revision 10212)
@@ -106,5 +106,5 @@
                     return e.getConstructor(Relation.class, Collection.class).newInstance(layer, r, selectedMembers);
                 }
-            } catch (Exception ex) {
+            } catch (ReflectiveOperationException ex) {
                 Main.warn(ex);
             }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTree.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTree.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTree.java	(revision 10212)
@@ -157,5 +157,5 @@
                 ds = reader.parseOsm(progressMonitor
                         .createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false));
-            } catch (Exception e) {
+            } catch (OsmTransferException e) {
                 if (canceled) {
                     Main.warn(tr("Ignoring exception because task was canceled. Exception: {0}", e.toString()));
Index: /trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java	(revision 10212)
@@ -147,5 +147,5 @@
                 try {
                     bookmarks.add(new Bookmark(entry));
-                } catch (Exception e) {
+                } catch (IllegalArgumentException e) {
                     Main.error(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 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java	(revision 10212)
@@ -144,5 +144,5 @@
         try {
             tpDownloadAreaSelectors.setSelectedIndex(Main.pref.getInteger("download.tab", 0));
-        } catch (Exception ex) {
+        } catch (IndexOutOfBoundsException ex) {
             Main.pref.putInteger("download.tab", 0);
         }
Index: /trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java	(revision 10212)
@@ -41,4 +41,5 @@
 import javax.swing.table.TableCellRenderer;
 import javax.swing.table.TableColumn;
+import javax.xml.parsers.ParserConfigurationException;
 
 import org.openstreetmap.josm.Main;
@@ -396,5 +397,5 @@
                     });
                 }
-            } catch (Exception e) {
+            } catch (IOException | ParserConfigurationException e) {
                 if (!canceled) {
                     OsmTransferException ex = new OsmTransferException(e);
Index: /trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java	(revision 10212)
@@ -16,4 +16,5 @@
 import java.awt.event.WindowEvent;
 import java.io.BufferedReader;
+import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.StringReader;
@@ -155,5 +156,5 @@
                 css.append('\n');
             }
-        } catch (Exception e) {
+        } catch (IOException e) {
             Main.error(tr("Failed to read CSS file ''help-browser.css''. Exception is: {0}", e.toString()));
             Main.error(e);
@@ -239,5 +240,5 @@
         try {
             help.getEditorKit().read(new StringReader(content), document, 0);
-        } catch (Exception e) {
+        } catch (IOException | BadLocationException e) {
             Main.error(e);
         }
@@ -376,5 +377,5 @@
                 history.setCurrentUrl(url);
                 this.url = url;
-            } catch (Exception e) {
+            } catch (HelpContentReaderException e) {
                 Main.warn(e);
                 HelpAwareOptionPane.showOptionDialog(
Index: /trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java	(revision 10212)
@@ -211,5 +211,5 @@
                         });
                     }
-                } catch (final Exception e) {
+                } catch (final RuntimeException e) {
                     BugReportExceptionHandler.handleException(e);
                 }
Index: /trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java	(revision 10212)
@@ -143,5 +143,5 @@
         try {
             HistoryOsmPrimitive.forOsmPrimitive(primitive);
-        } catch (Exception ign) {
+        } catch (IllegalArgumentException ign) {
             return false;
         }
Index: /trunk/src/org/openstreetmap/josm/gui/io/AbstractPrimitiveTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/AbstractPrimitiveTask.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/io/AbstractPrimitiveTask.java	(revision 10212)
@@ -113,5 +113,5 @@
 
             loadIncompleteNodes();
-        } catch (Exception e) {
+        } catch (OsmTransferException e) {
             if (canceled)
                 return;
Index: /trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetTask.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetTask.java	(revision 10212)
@@ -80,5 +80,5 @@
                 closedChangesets.add(cs);
             }
-        } catch (Exception e) {
+        } catch (OsmTransferException e) {
             if (canceled)
                 return;
Index: /trunk/src/org/openstreetmap/josm/gui/io/DownloadOpenChangesetsTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/DownloadOpenChangesetsTask.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/io/DownloadOpenChangesetsTask.java	(revision 10212)
@@ -154,5 +154,5 @@
                     getProgressMonitor().createSubTaskMonitor(1, false /* not internal */)
             );
-        } catch (Exception e) {
+        } catch (OsmTransferException e) {
             if (canceled)
                 return;
Index: /trunk/src/org/openstreetmap/josm/gui/io/SaveLayerTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/SaveLayerTask.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/io/SaveLayerTask.java	(revision 10212)
@@ -56,5 +56,5 @@
                 layerInfo.getLayer().onPostSaveToFile();
             }
-        } catch (Exception e) {
+        } catch (RuntimeException e) {
             Main.error(e);
             setLastException(e);
Index: /trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java	(revision 10212)
@@ -21,4 +21,5 @@
 import java.util.List;
 import java.util.concurrent.CancellationException;
+import java.util.concurrent.ExecutionException;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
@@ -496,5 +497,5 @@
                 } catch (CancellationException e) {
                     model.setUploadState(layer, UploadOrSaveState.CANCELED);
-                } catch (Exception e) {
+                } catch (InterruptedException | ExecutionException e) {
                     Main.error(e);
                     model.setUploadState(layer, UploadOrSaveState.FAILED);
@@ -537,5 +538,5 @@
                 } catch (CancellationException e) {
                     model.setSaveState(layerInfo.getLayer(), UploadOrSaveState.CANCELED);
-                } catch (Exception e) {
+                } catch (InterruptedException | ExecutionException e) {
                     Main.error(e);
                     model.setSaveState(layerInfo.getLayer(), UploadOrSaveState.FAILED);
Index: /trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java	(revision 10212)
@@ -137,5 +137,5 @@
                 }
             }
-        } catch (Exception sxe) {
+        } catch (OsmTransferException sxe) {
             if (isCanceled()) {
                 Main.info("Ignoring exception caught because upload is canceled. Exception is: " + sxe);
Index: /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 10212)
@@ -465,10 +465,5 @@
                 public void valueChanged(ListSelectionEvent arg0) {
                     int index = imgList.getSelectedIndex();
-                    Integer orientation = null;
-                    try {
-                        orientation = ExifReader.readOrientation(yLayer.data.get(index).getFile());
-                    } catch (Exception e) {
-                        Main.warn(e);
-                    }
+                    Integer orientation = ExifReader.readOrientation(yLayer.data.get(index).getFile());
                     imgDisp.setImage(yLayer.data.get(index).getFile(), orientation);
                     Date date = yLayer.data.get(index).getExifTime();
@@ -500,18 +495,8 @@
                     File sel = fc.getSelectedFile();
 
-                    Integer orientation = null;
-                    try {
-                        orientation = ExifReader.readOrientation(sel);
-                    } catch (Exception e) {
-                        Main.warn(e);
-                    }
+                    Integer orientation = ExifReader.readOrientation(sel);
                     imgDisp.setImage(sel, orientation);
 
-                    Date date = null;
-                    try {
-                        date = ExifReader.readTime(sel);
-                    } catch (Exception e) {
-                        Main.warn(e);
-                    }
+                    Date date = ExifReader.readTime(sel);
                     if (date != null) {
                         lbExifTime.setText(DateUtils.getDateTimeFormat(DateFormat.SHORT, DateFormat.MEDIUM).format(date));
@@ -967,5 +952,5 @@
                 final long deciSeconds = timezoneOffsetPair.b.getMilliseconds() / 100;
                 sldSeconds.setValue((int) (deciSeconds % 60));
-            } catch (Exception e) {
+            } catch (RuntimeException e) {
                 JOptionPane.showMessageDialog(Main.parent,
                         tr("An error occurred while trying to match the photos to the GPX track."
@@ -1015,12 +1000,8 @@
             for (GpxTrackSegment segment : trk.getSegments()) {
                 for (WayPoint curWp : segment.getWayPoints()) {
-                    try {
-                        final Date parsedTime = curWp.setTimeFromAttribute();
-                        if (parsedTime != null) {
-                            firstGPXDate = parsedTime.getTime();
-                            break outer;
-                        }
-                    } catch (Exception e) {
-                        Main.warn(e);
+                    final Date parsedTime = curWp.setTimeFromAttribute();
+                    if (parsedTime != null) {
+                        firstGPXDate = parsedTime.getTime();
+                        break outer;
                     }
                 }
@@ -1150,16 +1131,12 @@
 
                 for (WayPoint curWp : segment.getWayPoints()) {
-                    try {
-                        final Date parsedTime = curWp.setTimeFromAttribute();
-                        if (parsedTime != null) {
-                            final long curWpTime = parsedTime.getTime() + offset;
-                            ret += matchPoints(images, prevWp, prevWpTime, curWp, curWpTime, offset);
-
-                            prevWp = curWp;
-                            prevWpTime = curWpTime;
-                            continue;
-                        }
-                    } catch (Exception e) {
-                        Main.warn(e);
+                    final Date parsedTime = curWp.setTimeFromAttribute();
+                    if (parsedTime != null) {
+                        final long curWpTime = parsedTime.getTime() + offset;
+                        ret += matchPoints(images, prevWp, prevWpTime, curWp, curWpTime, offset);
+
+                        prevWp = curWp;
+                        prevWpTime = curWpTime;
+                        continue;
                     }
                     prevWp = null;
Index: /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageEntry.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageEntry.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageEntry.java	(revision 10212)
@@ -492,5 +492,5 @@
             // default is K (km/h)
             setSpeed(speed);
-        } catch (Exception ex) {
+        } catch (MetadataException ex) {
             if (Main.isDebugEnabled()) {
                 Main.debug(ex.getMessage());
@@ -516,5 +516,5 @@
             setPos(getExifCoor());
 
-        } catch (Exception ex) { // (other exceptions, e.g. #5271)
+        } catch (MetadataException | IndexOutOfBoundsException ex) { // (other exceptions, e.g. #5271)
             Main.error("Error reading EXIF from file: " + ex);
             setExifCoor(null);
@@ -527,5 +527,5 @@
                 setExifImgDir(direction);
             }
-        } catch (Exception ex) { // (CompoundException and other exceptions, e.g. #5271)
+        } catch (IndexOutOfBoundsException ex) { // (other exceptions, e.g. #5271)
             if (Main.isDebugEnabled()) {
                 Main.debug(ex.getMessage());
Index: /trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java	(revision 10212)
@@ -164,5 +164,5 @@
             int i = Main.pref.getInteger("draw.rawgps.colors", specName(layerName), 0);
             return ColorMode.fromIndex(i);
-        } catch (Exception e) {
+        } catch (IndexOutOfBoundsException e) {
             Main.warn(e);
         }
Index: /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java	(revision 10212)
@@ -51,10 +51,5 @@
     public static PlayHeadMarker create() {
         if (playHead == null) {
-            try {
-                playHead = new PlayHeadMarker();
-            } catch (Exception ex) {
-                Main.error(ex);
-                return null;
-            }
+            playHead = new PlayHeadMarker();
         }
         return playHead;
Index: /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/WebMarker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/WebMarker.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/WebMarker.java	(revision 10212)
@@ -66,5 +66,5 @@
             try {
                 setErroneous(path.isEmpty() || !new File(path).exists());
-            } catch (Exception e) {
+            } catch (SecurityException e) {
                 Main.warn(e);
                 setErroneous(true);
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java	(revision 10212)
@@ -622,5 +622,5 @@
                                 } catch (SecurityException ex) {
                                     Main.error(ex);
-                                } catch (Exception ex) {
+                                } catch (RuntimeException ex) {
                                     BugReportExceptionHandler.handleException(ex);
                                 } finally {
@@ -636,5 +636,5 @@
                 } catch (SecurityException ex) {
                     Main.error(ex);
-                } catch (Exception ex) {
+                } catch (RuntimeException ex) {
                     // allow to change most settings even if e.g. a plugin fails
                     BugReportExceptionHandler.handleException(ex);
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 10212)
@@ -504,5 +504,5 @@
             loader.realRun();
             return loader.sources;
-        } catch (Exception ex) {
+        } catch (IOException | SAXException | OsmTransferException ex) {
             throw new RuntimeException(ex);
         }
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java	(revision 10212)
@@ -575,5 +575,5 @@
                     movingComponent = "";
                     return true;
-                } catch (Exception e) {
+                } catch (IOException | UnsupportedFlavorException e) {
                     Main.error(e);
                 }
@@ -594,5 +594,5 @@
                             }
                         }
-                    } catch (Exception e) {
+                    } catch (IOException | UnsupportedFlavorException e) {
                         Main.error(e);
                     }
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java	(revision 10212)
@@ -84,5 +84,5 @@
                         new UIManager.LookAndFeelInfo(((LookAndFeel) oquaqua).getName(), "ch.randelshofer.quaqua.QuaquaLookAndFeel")
                 );
-            } catch (Exception ex) {
+            } catch (ReflectiveOperationException ex) {
                 // just debug, Quaqua may not even be installed...
                 Main.debug(ex.getMessage());
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java	(revision 10212)
@@ -36,4 +36,6 @@
 import org.openstreetmap.josm.gui.widgets.SelectAllOnFocusGainedDecorator;
 import org.openstreetmap.josm.io.OsmApi;
+import org.openstreetmap.josm.io.OsmApiInitializationException;
+import org.openstreetmap.josm.io.OsmTransferCanceledException;
 import org.openstreetmap.josm.tools.ImageProvider;
 import org.openstreetmap.josm.tools.Utils;
@@ -157,5 +159,5 @@
             try {
                 OsmApi.getOsmApi().initialize(null);
-            } catch (Exception x) {
+            } catch (OsmTransferCanceledException | OsmApiInitializationException x) {
                 Main.warn(x);
             }
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetItem.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetItem.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetItem.java	(revision 10212)
@@ -118,5 +118,5 @@
         try {
             return Integer.valueOf(str);
-        } catch (Exception e) {
+        } catch (NumberFormatException e) {
             if (Main.isTraceEnabled()) {
                 Main.trace(e.getMessage());
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/ComboMultiSelect.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/ComboMultiSelect.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/ComboMultiSelect.java	(revision 10212)
@@ -447,5 +447,5 @@
                                 "public static String[] methodName()"));
                     }
-                } catch (Exception e) {
+                } catch (ReflectiveOperationException e) {
                     Main.error(tr("Broken tagging preset \"{0}-{1}\" - Java method given in ''values_from'' threw {2} ({3})", key, text,
                             e.getClass().getName(), e.getMessage()));
Index: /trunk/src/org/openstreetmap/josm/gui/widgets/AbstractIdTextField.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/widgets/AbstractIdTextField.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/gui/widgets/AbstractIdTextField.java	(revision 10212)
@@ -38,5 +38,5 @@
                 validator = klass.getConstructor(JTextComponent.class).newInstance(this);
             }
-        } catch (Exception e) {
+        } catch (ReflectiveOperationException e) {
             Main.error(e);
         } finally {
Index: /trunk/src/org/openstreetmap/josm/io/BoundingBoxDownloader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/BoundingBoxDownloader.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/io/BoundingBoxDownloader.java	(revision 10212)
@@ -192,5 +192,5 @@
         } catch (OsmTransferException e) {
             throw e;
-        } catch (Exception e) {
+        } catch (IllegalDataException | IOException e) {
             throw new OsmTransferException(e);
         } finally {
Index: /trunk/src/org/openstreetmap/josm/io/CachedFile.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 10212)
@@ -352,5 +352,5 @@
                 Utils.close(zipFile);
             }
-        } catch (Exception e) {
+        } 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}",
Index: /trunk/src/org/openstreetmap/josm/io/FileImporter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/FileImporter.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/io/FileImporter.java	(revision 10212)
@@ -99,5 +99,5 @@
             }
             return false;
-        } catch (Exception e) {
+        } catch (IOException e) {
             displayError(f, e);
             return false;
@@ -138,5 +138,5 @@
             importData(files, progressMonitor);
             return true;
-        } catch (Exception e) {
+        } catch (IOException | IllegalDataException e) {
             Main.error(e);
             HelpAwareOptionPane.showMessageDialogInEDT(
Index: /trunk/src/org/openstreetmap/josm/io/GpxReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/GpxReader.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/io/GpxReader.java	(revision 10212)
@@ -409,5 +409,5 @@
                     try {
                         currentWayPoint.put(localName, Float.valueOf(accumulator.toString()));
-                    } catch (Exception e) {
+                    } catch (NumberFormatException e) {
                         currentWayPoint.put(localName, 0f);
                     }
Index: /trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java	(revision 10212)
@@ -522,5 +522,5 @@
                 try {
                     result = new FetchResult(OsmReader.parseDataSet(in, progressMonitor.createSubTaskMonitor(pkg.size(), false)), null);
-                } catch (Exception e) {
+                } catch (IllegalDataException e) {
                     throw new OsmTransferException(e);
                 }
@@ -550,5 +550,5 @@
                 try {
                     result = OsmReader.parseDataSet(in, progressMonitor.createSubTaskMonitor(1, false));
-                } catch (Exception e) {
+                } catch (IllegalDataException e) {
                     throw new OsmTransferException(e);
                 }
Index: /trunk/src/org/openstreetmap/josm/io/OsmApi.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmApi.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/io/OsmApi.java	(revision 10212)
@@ -263,5 +263,5 @@
             Main.addNetworkError(url, Utils.getRootCause(e));
             throw new OsmApiInitializationException(e);
-        } catch (Exception e) {
+        } catch (SAXException | IOException | ParserConfigurationException e) {
             initialized = false;
             throw new OsmApiInitializationException(e);
Index: /trunk/src/org/openstreetmap/josm/io/OsmApiException.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmApiException.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/io/OsmApiException.java	(revision 10212)
@@ -144,5 +144,5 @@
                 .append('>');
             }
-        } catch (Exception e) {
+        } catch (IllegalArgumentException e) {
             // Ignored
             if (Main.isTraceEnabled()) {
@@ -157,5 +157,5 @@
                 .append('>');
             }
-        } catch (Exception e) {
+        } catch (IllegalArgumentException e) {
             // Ignored
             if (Main.isTraceEnabled()) {
Index: /trunk/src/org/openstreetmap/josm/io/OsmChangesetParser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmChangesetParser.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/io/OsmChangesetParser.java	(revision 10212)
@@ -4,4 +4,5 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
+import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
@@ -283,5 +284,5 @@
         } catch (ParserConfigurationException | SAXException e) {
             throw new IllegalDataException(e.getMessage(), e);
-        } catch (Exception e) {
+        } catch (IOException e) {
             throw new IllegalDataException(e);
         } finally {
Index: /trunk/src/org/openstreetmap/josm/io/OsmReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmReader.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/io/OsmReader.java	(revision 10212)
@@ -4,4 +4,5 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
+import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
@@ -651,5 +652,5 @@
             else
                 throw new IllegalDataException(msg, e);
-        } catch (Exception e) {
+        } catch (IOException e) {
             throw new IllegalDataException(e);
         } finally {
Index: /trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java	(revision 10212)
@@ -4,4 +4,5 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
+import java.io.IOException;
 import java.io.InputStream;
 import java.text.MessageFormat;
@@ -135,5 +136,5 @@
         } catch (OsmTransferException e) {
             throw e;
-        } catch (Exception e) {
+        } catch (IOException | IllegalDataException e) {
             if (cancel)
                 return null;
Index: /trunk/src/org/openstreetmap/josm/io/OsmServerHistoryReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmServerHistoryReader.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/io/OsmServerHistoryReader.java	(revision 10212)
@@ -4,4 +4,5 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
+import java.io.IOException;
 import java.io.InputStream;
 import java.text.MessageFormat;
@@ -12,4 +13,5 @@
 import org.openstreetmap.josm.gui.progress.ProgressMonitor;
 import org.openstreetmap.josm.tools.CheckParameterUtil;
+import org.xml.sax.SAXException;
 
 /**
@@ -72,5 +74,5 @@
         } catch (OsmTransferException e) {
             throw e;
-        } catch (Exception e) {
+        } catch (IOException | SAXException e) {
             if (cancel)
                 return null;
Index: /trunk/src/org/openstreetmap/josm/io/OsmServerLocationReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmServerLocationReader.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/io/OsmServerLocationReader.java	(revision 10212)
@@ -52,5 +52,5 @@
         } catch (OsmTransferException e) {
             throw e;
-        } catch (Exception e) {
+        } catch (IOException | SAXException | IllegalDataException e) {
             if (cancel)
                 return null;
Index: /trunk/src/org/openstreetmap/josm/io/OsmServerObjectReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmServerObjectReader.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/io/OsmServerObjectReader.java	(revision 10212)
@@ -4,4 +4,5 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
+import java.io.IOException;
 import java.io.InputStream;
 import java.text.MessageFormat;
@@ -134,5 +135,5 @@
             if (cancel) return null;
             throw e;
-        } catch (Exception e) {
+        } catch (IOException | IllegalDataException e) {
             if (cancel) return null;
             throw new OsmTransferException(e);
Index: /trunk/src/org/openstreetmap/josm/io/OsmServerReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmServerReader.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/io/OsmServerReader.java	(revision 10212)
@@ -144,5 +144,5 @@
             try {
                 response = client.connect(progressMonitor);
-            } catch (Exception e) {
+            } catch (IOException e) {
                 Main.error(e);
                 OsmTransferException ote = new OsmTransferException(
@@ -163,5 +163,5 @@
                     try {
                         errorBody = response.fetchContent();
-                    } catch (Exception e) {
+                    } catch (IOException e) {
                         errorBody = tr("Reading error text failed.");
                     }
@@ -173,5 +173,5 @@
             } catch (OsmTransferException e) {
                 throw e;
-            } catch (Exception e) {
+            } catch (IOException e) {
                 throw new OsmTransferException(e);
             }
Index: /trunk/src/org/openstreetmap/josm/io/OsmServerUserInfoReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmServerUserInfoReader.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/io/OsmServerUserInfoReader.java	(revision 10212)
@@ -4,4 +4,5 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
+import java.io.IOException;
 import java.io.InputStream;
 import java.util.LinkedList;
@@ -9,4 +10,5 @@
 
 import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.xpath.XPath;
 import javax.xml.xpath.XPathConstants;
@@ -23,4 +25,5 @@
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
 
 public class OsmServerUserInfoReader extends OsmServerReader {
@@ -178,5 +181,5 @@
         } catch (OsmTransferException e) {
             throw e;
-        } catch (Exception e) {
+        } catch (IOException | ParserConfigurationException | SAXException e) {
             throw new OsmTransferException(e);
         } finally {
Index: /trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java	(revision 10212)
@@ -19,4 +19,5 @@
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
 
 import org.openstreetmap.josm.Main;
@@ -142,6 +143,5 @@
             builderFactory.setValidating(false);
             builderFactory.setNamespaceAware(true);
-            DocumentBuilder builder = null;
-            builder = builderFactory.newDocumentBuilder();
+            DocumentBuilder builder = builderFactory.newDocumentBuilder();
             builder.setEntityResolver(new EntityResolver() {
                 @Override
@@ -151,6 +151,5 @@
                 }
             });
-            Document document = null;
-            document = builder.parse(new InputSource(new StringReader(incomingData)));
+            Document document = builder.parse(new InputSource(new StringReader(incomingData)));
 
             // Some WMS service URLs specify a different base URL for their GetMap service
@@ -193,5 +192,5 @@
             List<Element> children = getChildren(capabilityElem, "Layer");
             layers = parseLayers(children, new HashSet<String>());
-        } catch (Exception e) {
+        } catch (MalformedURLException | ParserConfigurationException | SAXException e) {
             throw new WMSGetCapabilitiesException(e, incomingData);
         }
Index: /trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpServer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpServer.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpServer.java	(revision 10212)
@@ -36,5 +36,5 @@
             instance4 = new RemoteControlHttpServer(port, false);
             instance4.start();
-        } catch (Exception ex) {
+        } catch (IOException ex) {
             Main.warn(marktr("Cannot start IPv4 remotecontrol server on port {0}: {1}"),
                     Integer.toString(port), ex.getLocalizedMessage());
@@ -43,5 +43,5 @@
             instance6 = new RemoteControlHttpServer(port, true);
             instance6.start();
-        } catch (Exception ex) {
+        } catch (IOException ex) {
             /* only show error when we also have no IPv4 */
             if (instance4 == null) {
Index: /trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java	(revision 10212)
@@ -333,5 +333,5 @@
                 instance4 = new RemoteControlHttpsServer(port, false);
                 instance4.start();
-            } catch (Exception ex) {
+            } catch (IOException | GeneralSecurityException ex) {
                 Main.warn(marktr("Cannot start IPv4 remotecontrol https server on port {0}: {1}"),
                         Integer.toString(port), ex.getLocalizedMessage());
@@ -340,5 +340,5 @@
                 instance6 = new RemoteControlHttpsServer(port, true);
                 instance6.start();
-            } catch (Exception ex) {
+            } catch (IOException | GeneralSecurityException ex) {
                 /* only show error when we also have no IPv4 */
                 if (instance4 == null) {
Index: /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandler.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandler.java	(revision 10212)
@@ -47,5 +47,5 @@
                 }
             }
-        } catch (Exception ex) {
+        } catch (RuntimeException ex) {
             Main.warn("RemoteControl: Error parsing import remote control request:");
             Main.error(ex);
Index: /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java	(revision 10212)
@@ -145,5 +145,5 @@
                 }
             }
-        } catch (Exception ex) {
+        } catch (RuntimeException ex) {
             Main.warn("RemoteControl: Error parsing load_and_zoom remote control request:");
             Main.error(ex);
Index: /trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java	(revision 10212)
@@ -9,5 +9,4 @@
 import java.io.OutputStream;
 import java.io.OutputStreamWriter;
-import java.lang.reflect.Constructor;
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
@@ -97,7 +96,6 @@
             return null;
         try {
-            Constructor<? extends SessionLayerExporter> constructor = exporterClass.getConstructor(layerClass);
-            return constructor.newInstance(layer);
-        } catch (Exception e) {
+            return exporterClass.getConstructor(layerClass).newInstance(layer);
+        } catch (ReflectiveOperationException e) {
             throw new RuntimeException(e);
         }
Index: /trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 10212)
@@ -15,4 +15,5 @@
 import java.io.File;
 import java.io.FilenameFilter;
+import java.io.IOException;
 import java.net.URL;
 import java.net.URLClassLoader;
@@ -723,5 +724,5 @@
                         + "Delete from preferences?</html>", plugin.name, plugin.className);
             }
-        }  catch (Exception e) {
+        }  catch (RuntimeException e) {
             pluginLoadingExceptions.put(plugin.name, e);
             Main.error(e);
@@ -1193,5 +1194,5 @@
                 // Check the plugin is a valid and accessible JAR file before installing it (fix #7754)
                 new JarFile(updatedPlugin).close();
-            } catch (Exception e) {
+            } catch (IOException e) {
                 if (dowarn) {
                     Main.warn(tr("Failed to install plugin ''{0}'' from temporary download file ''{1}''. {2}",
@@ -1221,5 +1222,5 @@
             try {
                 new JarFile(jar).close();
-            } catch (Exception e) {
+            } catch (IOException e) {
                 Main.warn(e);
                 return false;
Index: /trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java	(revision 10212)
@@ -273,5 +273,5 @@
                         }
                     }
-                } catch (Exception e) {
+                } catch (NumberFormatException e) {
                     Main.error(e);
                 }
Index: /trunk/src/org/openstreetmap/josm/plugins/PluginProxy.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/plugins/PluginProxy.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/plugins/PluginProxy.java	(revision 10212)
@@ -2,4 +2,5 @@
 package org.openstreetmap.josm.plugins;
 
+import java.lang.reflect.InvocationTargetException;
 import java.util.List;
 
@@ -45,5 +46,5 @@
         } catch (NoSuchMethodException e) {
             Main.debug("Plugin "+plugin+" does not define mapFrameInitialized");
-        } catch (Exception e) {
+        } catch (InvocationTargetException | IllegalAccessException | IllegalArgumentException e) {
             handlePluginException(e);
         }
@@ -57,5 +58,5 @@
             Main.debug("Plugin "+plugin+" does not define getPreferenceSetting");
             return null;
-        } catch (Exception e) {
+        } catch (InvocationTargetException | IllegalAccessException | IllegalArgumentException e) {
             handlePluginException(e);
         }
@@ -69,5 +70,5 @@
         } catch (NoSuchMethodException e) {
             Main.debug("Plugin "+plugin+" does not define addDownloadSelection");
-        } catch (Exception e) {
+        } catch (InvocationTargetException | IllegalAccessException | IllegalArgumentException e) {
             handlePluginException(e);
         }
Index: /trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java	(revision 10212)
@@ -207,5 +207,5 @@
             audioPlayer = new AudioPlayer();
             return audioPlayer;
-        } catch (Exception ex) {
+        } catch (RuntimeException ex) {
             Main.error(ex);
             return null;
@@ -249,5 +249,5 @@
         AudioInputStream audioInputStream = null;
         SourceDataLine audioOutputLine = null;
-        AudioFormat audioFormat = null;
+        AudioFormat audioFormat;
         byte[] abData = new byte[(int) chunk];
 
@@ -266,5 +266,5 @@
                         command.possiblyInterrupt();
                         for (;;) {
-                            int nBytesRead = 0;
+                            int nBytesRead;
                             nBytesRead = audioInputStream.read(abData, 0, abData.length);
                             position += nBytesRead / bytesPerSecond;
@@ -362,6 +362,7 @@
                     command.failed(startPlayingException); // sets state
                 }
-            } catch (Exception e) {
+            } catch (IOException e) {
                 state = State.NOTPLAYING;
+                Main.error(e);
             }
         }
Index: /trunk/src/org/openstreetmap/josm/tools/ExifReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/ExifReader.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/tools/ExifReader.java	(revision 10212)
@@ -78,5 +78,5 @@
                 return date;
             }
-        } catch (Exception e) {
+        } catch (UncheckedParseException | JpegProcessingException | IOException e) {
             Main.error(e);
         }
Index: /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 10212)
@@ -83,4 +83,5 @@
 
 import com.kitfox.svg.SVGDiagram;
+import com.kitfox.svg.SVGException;
 import com.kitfox.svg.SVGUniverse;
 
@@ -986,5 +987,5 @@
                 }
             }
-        } catch (Exception e) {
+        } catch (IOException e) {
             Main.warn(tr("Failed to handle zip file ''{0}''. Exception was: {1}", archive.getName(), e.toString()));
         }
@@ -1153,5 +1154,5 @@
         } catch (SAXReturnException r) {
             return r.getResult();
-        } catch (Exception e) {
+        } catch (IOException | SAXException e) {
             Main.warn("Parsing " + base + fn + " failed:\n" + e);
             return null;
@@ -1427,5 +1428,5 @@
                 svg.render(g);
             }
-        } catch (Exception ex) {
+        } catch (SVGException ex) {
             Main.error("Unable to load svg: {0}", ex.getMessage());
             return null;
Index: /trunk/src/org/openstreetmap/josm/tools/OpenBrowser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/OpenBrowser.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/tools/OpenBrowser.java	(revision 10212)
@@ -7,4 +7,5 @@
 import java.io.IOException;
 import java.net.URI;
+import java.net.URISyntaxException;
 
 import org.openstreetmap.josm.Main;
@@ -62,5 +63,5 @@
                     }
                 }
-            } catch (Exception e) {
+            } catch (IOException e) {
                 Main.warn(e);
                 return e.getMessage();
@@ -88,5 +89,5 @@
         try {
             return displayUrl(new URI(url));
-        } catch (Exception e) {
+        } catch (URISyntaxException e) {
             return e.getMessage();
         }
Index: /trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java	(revision 10212)
@@ -8,4 +8,5 @@
 import java.io.Reader;
 import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
@@ -156,5 +157,5 @@
                     }
                 }
-            } catch (Exception e) {
+            } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
                 Main.error(e); // SAXException does not dump inner exceptions.
                 throwException(e);
Index: /trunk/src/org/openstreetmap/josm/tools/bugreport/BugReportExceptionHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/bugreport/BugReportExceptionHandler.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/tools/bugreport/BugReportExceptionHandler.java	(revision 10212)
@@ -144,5 +144,5 @@
                     JPanel p = buildPanel(e);
                     JOptionPane.showMessageDialog(Main.parent, p, tr("You have encountered a bug in JOSM"), JOptionPane.ERROR_MESSAGE);
-                } catch (Exception ex) {
+                } catch (RuntimeException ex) {
                     Main.error(ex);
                 }
Index: /trunk/src/org/openstreetmap/josm/tools/date/DateUtils.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/date/DateUtils.java	(revision 10211)
+++ /trunk/src/org/openstreetmap/josm/tools/date/DateUtils.java	(revision 10212)
@@ -136,5 +136,5 @@
         try {
             return XML_DATE.newXMLGregorianCalendar(str).toGregorianCalendar().getTimeInMillis();
-        } catch (Exception ex) {
+        } catch (IllegalArgumentException ex) {
             throw new UncheckedParseException("The date string (" + str + ") could not be parsed.", ex);
         }
