Index: /trunk/src/org/openstreetmap/josm/io/OsmReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmReader.java	(revision 14087)
+++ /trunk/src/org/openstreetmap/josm/io/OsmReader.java	(revision 14088)
@@ -137,4 +137,12 @@
     }
 
+    private void handleIllegalDataException(IllegalDataException e) throws XMLStreamException {
+        if (e.getCause() instanceof XMLStreamException) {
+            throw (XMLStreamException) e.getCause();
+        } else {
+            throwException(e);
+        }
+    }
+
     private void parseBounds(String generator) throws XMLStreamException {
         String minlon = parser.getAttributeValue(null, "minlon");
@@ -146,5 +154,5 @@
             parseBounds(generator, minlon, minlat, maxlon, maxlat, origin);
         } catch (IllegalDataException e) {
-            throwException(e);
+            handleIllegalDataException(e);
         }
         jumpToEnd();
@@ -157,5 +165,5 @@
             return parseNode(lat, lon, this::readCommon, this::parseNodeTags);
         } catch (IllegalDataException e) {
-            throwException(e);
+            handleIllegalDataException(e);
         }
         return null;
@@ -185,5 +193,5 @@
             return parseWay(this::readCommon, this::parseWayNodesAndTags);
         } catch (IllegalDataException e) {
-            throwException(e);
+            handleIllegalDataException(e);
         }
         return null;
@@ -234,6 +242,7 @@
             return parseRelation(this::readCommon, this::parseRelationMembersAndTags);
         } catch (IllegalDataException e) {
-            throw new XMLStreamException(e);
-        }
+            handleIllegalDataException(e);
+        }
+        return null;
     }
 
@@ -271,5 +280,5 @@
             jumpToEnd();
         } catch (IllegalDataException e) {
-            throwException(e);
+            handleIllegalDataException(e);
         }
         return result;
