Index: trunk/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java	(revision 3068)
+++ trunk/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java	(revision 3069)
@@ -15,4 +15,5 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.io.ChangesetClosedException;
+import org.openstreetmap.josm.io.IllegalDataException;
 import org.openstreetmap.josm.io.MissingOAuthAccessTokenException;
 import org.openstreetmap.josm.io.OsmApiException;
@@ -140,4 +141,21 @@
                 JOptionPane.ERROR_MESSAGE,
                 ht("/ErrorMessages#NestedIOException")
+        );
+    }
+
+    /**
+     * Explains a {@see IllegalDataException} which has caused an {@see OsmTransferException}.
+     * This is most likely happening when JOSM tries to load data in in an unsupported format.
+     *
+     * @param e the exception
+     */
+
+    public static void explainNestedIllegalDataException(OsmTransferException e) {
+        HelpAwareOptionPane.showOptionDialog(
+                Main.parent,
+                ExceptionUtil.explainNestedIllegalDataException(e),
+                tr("Illegal Data"),
+                JOptionPane.ERROR_MESSAGE,
+                ht("/ErrorMessages#IllegalDataException")
         );
     }
@@ -341,4 +359,8 @@
             return;
         }
+        if (getNestedException(e, IllegalDataException.class) != null) {
+            explainNestedIllegalDataException(e);
+            return;
+        }
         if (e instanceof OsmApiInitializationException) {
             explainOsmApiInitializationException((OsmApiInitializationException) e);
Index: trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java	(revision 3068)
+++ trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java	(revision 3069)
@@ -21,4 +21,5 @@
 import org.openstreetmap.josm.gui.preferences.server.OAuthAccessTokenHolder;
 import org.openstreetmap.josm.io.ChangesetClosedException;
+import org.openstreetmap.josm.io.IllegalDataException;
 import org.openstreetmap.josm.io.MissingOAuthAccessTokenException;
 import org.openstreetmap.josm.io.OsmApi;
@@ -283,4 +284,19 @@
 
     /**
+     * Explains a {@see IllegalDataException} which has caused an {@see OsmTransferException}.
+     * This is most likely happening when JOSM tries to load data in in an unsupported format.
+     *
+     * @param e the exception
+     */
+    public static String explainNestedIllegalDataException(OsmTransferException e) {
+        IllegalDataException ide = getNestedException(e, IllegalDataException.class);
+        String message = tr("<html>Failed to download data."
+                + "Its format is either unsupported, ill-formed, and/or inconsistent.<br>"
+                + "<br>Details(untranslated): {0}</html>", ide.getMessage());
+        e.printStackTrace();
+        return message;
+    }
+
+    /**
      * Explains a {@see OsmApiException} which was thrown because of an internal server
      * error in the OSM API server..
@@ -306,7 +322,7 @@
         String apiUrl = OsmApi.getOsmApi().getBaseUrl();
         String message = tr("The OSM server ''{0}'' reported a bad request.<br>", apiUrl);
-        if (e.getErrorHeader() != null && 
-                (e.getErrorHeader().startsWith("The maximum bbox") || 
-                e.getErrorHeader().startsWith("You requested too many nodes"))) {
+        if (e.getErrorHeader() != null &&
+                (e.getErrorHeader().startsWith("The maximum bbox") ||
+                        e.getErrorHeader().startsWith("You requested too many nodes"))) {
             message += "<br>"
                 + tr("The area you tried to download is too big or your request was too large."
