Changeset 2181 in josm for trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java
- Timestamp:
- 2009-09-22T15:34:19+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java
r2070 r2181 102 102 Matcher m = p.matcher(preferenceValue); 103 103 if (!m.find()) 104 throw new WindowGeometryException(tr(" preference with key ''{0}'' doesn''t include ''{1}''. Can''t restore window geometry from preferences.", preferenceKey, field));104 throw new WindowGeometryException(tr("Preference with key ''{0}'' does not include ''{1}''. Can''t restore window geometry from preferences.", preferenceKey, field)); 105 105 v = m.group(1); 106 106 return Integer.parseInt(v); … … 108 108 throw e; 109 109 } catch(NumberFormatException e) { 110 throw new WindowGeometryException(tr(" preference with key ''{0}'' doesn''t provide an int value for ''{1}''. Got {2}. Can''t restore window geometry from preferences.", preferenceKey, field, v));110 throw new WindowGeometryException(tr("Preference with key ''{0}'' does not provide an int value for ''{1}''. Got {2}. Can''t restore window geometry from preferences.", preferenceKey, field, v)); 111 111 } catch(Exception e) { 112 throw new WindowGeometryException(tr(" failed to parse field ''{1}'' in preference with key ''{0}''. Exception was: {2}. Can''t restore window geometry from preferences.", preferenceKey, field, e.toString()), e);112 throw new WindowGeometryException(tr("Failed to parse field ''{1}'' in preference with key ''{0}''. Exception was: {2}. Can''t restore window geometry from preferences.", preferenceKey, field, e.toString()), e); 113 113 } 114 114 } … … 117 117 String value = Main.pref.get(preferenceKey); 118 118 if (value == null) 119 throw new WindowGeometryException(tr(" preference with key ''{0}'' doesn''t exist. Can''t restore window geometry from preferences.", preferenceKey));119 throw new WindowGeometryException(tr("Preference with key ''{0}'' does not exist. Can''t restore window geometry from preferences.", preferenceKey)); 120 120 topLeft = new Point(); 121 121 extent = new Dimension(); … … 156 156 initFromPreferences(preferenceKey); 157 157 } catch(WindowGeometryException e) { 158 System.out.println(tr("Warning: failed to restore window geometry from key ''{0}''. Falling back to default geometry. Details: {1}", preferenceKey, e.getMessage()));158 System.out.println(tr("Warning: Failed to restore window geometry from key ''{0}''. Falling back to default geometry. Details: {1}", preferenceKey, e.getMessage())); 159 159 initFromWindowGeometry(defaultGeometry); 160 160 }
Note:
See TracChangeset
for help on using the changeset viewer.