Changeset 3069 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2010-03-02T17:16:24+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java
r3023 r3069 21 21 import org.openstreetmap.josm.gui.preferences.server.OAuthAccessTokenHolder; 22 22 import org.openstreetmap.josm.io.ChangesetClosedException; 23 import org.openstreetmap.josm.io.IllegalDataException; 23 24 import org.openstreetmap.josm.io.MissingOAuthAccessTokenException; 24 25 import org.openstreetmap.josm.io.OsmApi; … … 283 284 284 285 /** 286 * Explains a {@see IllegalDataException} which has caused an {@see OsmTransferException}. 287 * This is most likely happening when JOSM tries to load data in in an unsupported format. 288 * 289 * @param e the exception 290 */ 291 public static String explainNestedIllegalDataException(OsmTransferException e) { 292 IllegalDataException ide = getNestedException(e, IllegalDataException.class); 293 String message = tr("<html>Failed to download data." 294 + "Its format is either unsupported, ill-formed, and/or inconsistent.<br>" 295 + "<br>Details(untranslated): {0}</html>", ide.getMessage()); 296 e.printStackTrace(); 297 return message; 298 } 299 300 /** 285 301 * Explains a {@see OsmApiException} which was thrown because of an internal server 286 302 * error in the OSM API server.. … … 306 322 String apiUrl = OsmApi.getOsmApi().getBaseUrl(); 307 323 String message = tr("The OSM server ''{0}'' reported a bad request.<br>", apiUrl); 308 if (e.getErrorHeader() != null && 309 (e.getErrorHeader().startsWith("The maximum bbox") || 310 e.getErrorHeader().startsWith("You requested too many nodes"))) { 324 if (e.getErrorHeader() != null && 325 (e.getErrorHeader().startsWith("The maximum bbox") || 326 e.getErrorHeader().startsWith("You requested too many nodes"))) { 311 327 message += "<br>" 312 328 + tr("The area you tried to download is too big or your request was too large."
Note:
See TracChangeset
for help on using the changeset viewer.