Changeset 3101 in josm for trunk/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java
- Timestamp:
- 2010-03-09T14:00:46+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java
r3083 r3101 282 282 283 283 /** 284 * Explains a {@see OsmApiException} which was thrown because of a 285 * client timeout (HTTP 408) 286 * 287 * @param e the exception 288 */ 289 public static void explainClientTimeout(OsmApiException e) { 290 HelpAwareOptionPane.showOptionDialog( 291 Main.parent, 292 ExceptionUtil.explainClientTimeout(e), 293 tr("Client Time Out"), 294 JOptionPane.ERROR_MESSAGE, 295 ht("/ErrorMessages#ClientTimeOut") 296 ); 297 } 298 299 /** 300 * Explains a {@see OsmApiException} with a generic error 301 * message. 302 * 303 * @param e the exception 304 */ 305 public static void explainGenericHttpException(OsmApiException e) { 306 HelpAwareOptionPane.showOptionDialog( 307 Main.parent, 308 ExceptionUtil.explainClientTimeout(e), 309 tr("Communication with OSM server failed"), 310 JOptionPane.ERROR_MESSAGE, 311 ht("/ErrorMessages#GenericCommunicationError") 312 ); 313 } 314 315 /** 284 316 * Explains a {@see OsmApiException} which was thrown because accessing a protected 285 317 * resource was forbidden. … … 405 437 explainAuthorizationFailed(oae); 406 438 return; 439 case HttpURLConnection.HTTP_CLIENT_TIMEOUT: 440 explainClientTimeout(oae); 441 return; 442 default: 443 explainGenericHttpException(oae); 444 return; 407 445 } 408 446 }
Note:
See TracChangeset
for help on using the changeset viewer.
