Changeset 79 in josm for src/org/openstreetmap/josm/io/OsmReader.java
- Timestamp:
- 2006-04-03T22:25:02+02:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/io/OsmReader.java
r72 r79 74 74 throw new SAXException("Unknown version."); 75 75 if (!"0.3".equals(atts.getValue("version"))) 76 throw new SAXException("Unknown version :"+atts.getValue("version"));76 throw new SAXException("Unknown version "+atts.getValue("version")); 77 77 } else if (qName.equals("node")) { 78 78 Node n = new Node(new LatLon(getDouble(atts, "lat"), getDouble(atts, "lon"))); … … 93 93 if (current instanceof Way) { 94 94 long id = getLong(atts, "id"); 95 if (id == 0) 96 throw new SAXException("Incomplete line segment with id=0"); 95 97 LineSegment ls = lineSegments.get(id); 96 98 if (ls == null) { … … 105 107 } 106 108 } catch (NumberFormatException x) { 109 x.printStackTrace(); // SAXException does not chain correctly 107 110 throw new SAXException(x.getMessage(), x); 108 111 } catch (NullPointerException x) { … … 122 125 * Read out the common attributes from atts and put them into this.current. 123 126 */ 124 private void readCommon(Attributes atts) {127 private void readCommon(Attributes atts) throws SAXException { 125 128 current.id = getLong(atts, "id"); 129 if (current.id == 0) 130 throw new SAXException("Illegal object with id=0"); 126 131 String action = atts.getValue("action"); 127 132 if ("delete".equals(action))
Note:
See TracChangeset
for help on using the changeset viewer.