Changeset 3255 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2010-05-15T21:57:19+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java
r3112 r3255 144 144 /** 145 145 * Explains an OSM API exception because of a client timeout (HTTP 408). 146 * 146 * 147 147 * @param e the exception 148 148 * @return the message … … 159 159 /** 160 160 * Replies a generic error message for an OSM API exception 161 * 161 * 162 162 * @param e the exception 163 163 * @return the message … … 278 278 279 279 public static String explainSecurityException(OsmTransferException e) { 280 String apiUrl = OsmApi.getOsmApi().getBaseUrl();280 String apiUrl = e.getUrl(); 281 281 String host = tr("unknown"); 282 282 try { … … 301 301 302 302 public static String explainNestedSocketException(OsmTransferException e) { 303 String apiUrl = OsmApi.getOsmApi().getBaseUrl();303 String apiUrl = e.getUrl(); 304 304 String message = tr("<html>Failed to open a connection to the remote server<br>" + "''{0}''.<br>" 305 305 + "Please check your internet connection.</html>", apiUrl); … … 318 318 public static String explainNestedIOException(OsmTransferException e) { 319 319 IOException ioe = getNestedException(e, IOException.class); 320 String apiUrl = OsmApi.getOsmApi().getBaseUrl();320 String apiUrl = e.getUrl(); 321 321 String message = tr("<html>Failed to upload data to or download data from<br>" + "''{0}''<br>" 322 322 + "due to a problem with transferring data.<br>" + "Details(untranslated): {1}</html>", apiUrl, ioe … … 349 349 350 350 public static String explainInternalServerError(OsmTransferException e) { 351 String apiUrl = OsmApi.getOsmApi().getBaseUrl();351 String apiUrl = e.getUrl(); 352 352 String message = tr("<html>The OSM server<br>" + "''{0}''<br>" + "reported an internal server error.<br>" 353 353 + "This is most likely a temporary problem. Please try again later.</html>", apiUrl); … … 404 404 */ 405 405 406 public static String explainNestedUnk onwnHostException(OsmTransferException e) {407 String apiUrl = OsmApi.getOsmApi().getBaseUrl();406 public static String explainNestedUnknownHostException(OsmTransferException e) { 407 String apiUrl = e.getUrl(); 408 408 String host = tr("unknown"); 409 409 try { … … 453 453 return explainNestedSocketException(e); 454 454 if (getNestedException(e, UnknownHostException.class) != null) 455 return explainNestedUnk onwnHostException(e);455 return explainNestedUnknownHostException(e); 456 456 if (getNestedException(e, IOException.class) != null) 457 457 return explainNestedIOException(e);
Note:
See TracChangeset
for help on using the changeset viewer.