Changeset 2181 in josm for trunk/src/org/openstreetmap/josm/io/OsmHistoryReader.java
- Timestamp:
- 2009-09-22T15:34:19+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/OsmHistoryReader.java
r1811 r2181 66 66 String v = attr.getValue(name); 67 67 if (v == null) { 68 throwException(tr(" mandatory attribute ''{0}'' missing", name));68 throwException(tr("Missing mandatory attribute ''{0}''.", name)); 69 69 } 70 70 Long l = 0l; … … 72 72 l = Long.parseLong(v); 73 73 } catch(NumberFormatException e) { 74 throwException(tr(" illegal value for mandatory attribute ''{0}'' of type long, got ''{1}''", name, v));74 throwException(tr("Illegal value for mandatory attribute ''{0}'' of type long. Got ''{1}''.", name, v)); 75 75 } 76 76 if (l < 0) { 77 throwException(tr(" illegal value for mandatory attribute ''{0}'' of type long (>=0), got ''{1}''", name, v));77 throwException(tr("Illegal value for mandatory attribute ''{0}'' of type long (>=0). Got ''{1}''.", name, v)); 78 78 } 79 79 return l; … … 83 83 String v = attr.getValue(name); 84 84 if (v == null) { 85 throwException(tr(" mandatory attribute ''{0}'' missing", name));85 throwException(tr("Missing mandatory attribute ''{0}''.", name)); 86 86 } 87 87 Integer i = 0; … … 89 89 i = Integer.parseInt(v); 90 90 } catch(NumberFormatException e) { 91 throwException(tr(" illegal value for mandatory attribute ''{0}'' of type int, got ''{1}''", name, v));91 throwException(tr("Illegal value for mandatory attribute ''{0}'' of type int. Got ''{1}''.", name, v)); 92 92 } 93 93 if (i < 0) { 94 throwException(tr(" illegal value for mandatory attribute ''{0}'' of type int (>=0), got ''{1}''", name, v));94 throwException(tr("Illegal value for mandatory attribute ''{0}'' of type int (>=0). Got ''{1}''.", name, v)); 95 95 } 96 96 return i; … … 100 100 String v = attr.getValue(name); 101 101 if (v == null) { 102 throwException(tr(" mandatory attribute ''{0}'' missing", name));102 throwException(tr("Missing mandatory attribute ''{0}''.", name)); 103 103 } 104 104 return v; … … 108 108 String v = attr.getValue(name); 109 109 if (v == null) { 110 throwException(tr(" mandatory attribute ''{0}'' missing", name));110 throwException(tr("Missing mandatory attribute ''{0}''.", name)); 111 111 } 112 112 if (v.equals("true")) return true; 113 113 if (v.equals("false")) return false; 114 throwException(tr(" illegal value for mandatory attribute ''{0}'' of type boolean, got ''{1}''", name, v));114 throwException(tr("Illegal value for mandatory attribute ''{0}'' of type boolean. Got ''{1}''.", name, v)); 115 115 // not reached 116 116 return false; … … 172 172 type = OsmPrimitiveType.fromApiTypeName(v); 173 173 } catch(IllegalArgumentException e) { 174 throwException(tr(" illegal value for mandatory attribute ''{0}'' of type OsmPrimitiveType, got ''{1}''", "type", v));174 throwException(tr("Illegal value for mandatory attribute ''{0}'' of type OsmPrimitiveType. Got ''{1}''.", "type", v)); 175 175 } 176 176 String role = getMandatoryAttributeString(atts, "role");
Note:
See TracChangeset
for help on using the changeset viewer.