public final class ExceptionDialogUtil extends Object
Modifier | Constructor and Description |
---|---|
private |
ExceptionDialogUtil()
just static utility functions. no constructor
|
Modifier and Type | Method and Description |
---|---|
static void |
explainAuthenticationFailed(OsmApiException e)
Explains a
OsmApiException which was thrown because the authentication at
the OSM server failed |
static void |
explainAuthorizationFailed(OsmApiException e)
Explains a
OsmApiException which was thrown because accessing a protected
resource was forbidden (HTTP 403). |
static void |
explainBadRequest(OsmApiException e)
Explains a
OsmApiException which was thrown because of a bad
request |
static void |
explainBandwidthLimitExceeded(OsmApiException e)
Explains a
OsmApiException which was thrown because of a
bandwidth limit (HTTP 509) |
static void |
explainChangesetClosedException(ChangesetClosedException e)
handles a ChangesetClosedException
|
static void |
explainClientTimeout(OsmApiException e)
Explains a
OsmApiException which was thrown because of a
client timeout (HTTP 408) |
static void |
explainConflict(OsmApiException e)
Explains a
OsmApiException which was thrown because of a conflict |
static void |
explainException(Exception e)
Explains an
Exception to the user. |
static void |
explainGeneric(Exception e)
Explains an exception with a generic message dialog
|
static void |
explainGenericHttpException(OsmApiException e)
Explains a
OsmApiException with a generic error
message. |
static void |
explainGoneForUnknownPrimitive(OsmApiException e)
explains the case of an error due to a delete request on an already deleted
OsmPrimitive , i.e. a HTTP response code 410, where we don't know which
OsmPrimitive is causing the error. |
static void |
explainInternalServerError(OsmTransferException e)
Explains a
OsmApiException which was thrown because of an internal server
error in the OSM API server. |
static void |
explainMissingOAuthAccessTokenException(MissingOAuthAccessTokenException e)
Explains a
OsmApiException which was thrown because accessing a protected
resource was forbidden. |
static void |
explainNestedIllegalDataException(OsmTransferException e)
Explains a
IllegalDataException which has caused an OsmTransferException . |
static void |
explainNestedInvocationTargetException(Exception e)
Explains a
InvocationTargetException |
static void |
explainNestedIOException(OsmTransferException e)
Explains a
IOException which has caused an OsmTransferException . |
static void |
explainNestedSocketException(OsmTransferException e)
Explains a
SocketException which has caused an OsmTransferException . |
static void |
explainNestedUnkonwnHostException(OsmTransferException e)
Explains a
UnknownHostException which has caused an OsmTransferException . |
static void |
explainNotFound(OsmApiException e)
Explains a
OsmApiException which was thrown because a resource wasn't found
on the server |
static void |
explainOsmApiInitializationException(OsmApiInitializationException e)
handles an exception caught during OSM API initialization
|
static void |
explainOsmTransferException(OsmTransferException e)
Explains an
OsmTransferException to the user. |
static void |
explainPreconditionFailed(OsmApiException e)
Explains an upload error due to a violated precondition, i.e. a HTTP return code 412
|
static void |
explainSecurityException(OsmTransferException e)
Explains a
SecurityException which has caused an OsmTransferException . |
protected static <T> T |
getNestedException(Exception e,
Class<T> nestedClass)
Replies the first nested exception of type
nestedClass (including
the root exception e ) or null, if no such exception is found. |
private ExceptionDialogUtil()
public static void explainOsmApiInitializationException(OsmApiInitializationException e)
e
- the exceptionpublic static void explainChangesetClosedException(ChangesetClosedException e)
e
- the exceptionpublic static void explainPreconditionFailed(OsmApiException e)
e
- the exceptionpublic static void explainGeneric(Exception e)
e
- the exceptionpublic static void explainSecurityException(OsmTransferException e)
SecurityException
which has caused an OsmTransferException
.
This is most likely happening when user tries to access the OSM API from within an
applet which wasn't loaded from the API server.e
- the exceptionpublic static void explainNestedSocketException(OsmTransferException e)
SocketException
which has caused an OsmTransferException
.
This is most likely because there's not connection to the Internet or because
the remote server is not reachable.e
- the exceptionpublic static void explainNestedIOException(OsmTransferException e)
IOException
which has caused an OsmTransferException
.
This is most likely happening when the communication with the remote server is
interrupted for any reason.e
- the exceptionpublic static void explainNestedIllegalDataException(OsmTransferException e)
IllegalDataException
which has caused an OsmTransferException
.
This is most likely happening when JOSM tries to load data in in an unsupported format.e
- the exceptionpublic static void explainNestedInvocationTargetException(Exception e)
InvocationTargetException
e
- the exceptionpublic static void explainInternalServerError(OsmTransferException e)
OsmApiException
which was thrown because of an internal server
error in the OSM API server.e
- the exceptionpublic static void explainBadRequest(OsmApiException e)
OsmApiException
which was thrown because of a bad
requeste
- the exceptionpublic static void explainNotFound(OsmApiException e)
OsmApiException
which was thrown because a resource wasn't found
on the servere
- the exceptionpublic static void explainConflict(OsmApiException e)
OsmApiException
which was thrown because of a conflicte
- the exceptionpublic static void explainAuthenticationFailed(OsmApiException e)
OsmApiException
which was thrown because the authentication at
the OSM server failede
- the exceptionpublic static void explainAuthorizationFailed(OsmApiException e)
OsmApiException
which was thrown because accessing a protected
resource was forbidden (HTTP 403).e
- the exceptionpublic static void explainClientTimeout(OsmApiException e)
OsmApiException
which was thrown because of a
client timeout (HTTP 408)e
- the exceptionpublic static void explainBandwidthLimitExceeded(OsmApiException e)
OsmApiException
which was thrown because of a
bandwidth limit (HTTP 509)e
- the exceptionpublic static void explainGenericHttpException(OsmApiException e)
OsmApiException
with a generic error
message.e
- the exceptionpublic static void explainMissingOAuthAccessTokenException(MissingOAuthAccessTokenException e)
OsmApiException
which was thrown because accessing a protected
resource was forbidden.e
- the exceptionpublic static void explainNestedUnkonwnHostException(OsmTransferException e)
UnknownHostException
which has caused an OsmTransferException
.
This is most likely happening when there is an error in the API URL or when
local DNS services are not working.e
- the exceptionprotected static <T> T getNestedException(Exception e, Class<T> nestedClass)
nestedClass
(including
the root exception e
) or null, if no such exception is found.T
- e
- the root exceptionnestedClass
- the type of the nested exceptionnestedClass
(including
the root exception e
) or null, if no such exception is found.public static void explainOsmTransferException(OsmTransferException e)
OsmTransferException
to the user.e
- the OsmTransferException
public static void explainGoneForUnknownPrimitive(OsmApiException e)
OsmPrimitive
, i.e. a HTTP response code 410, where we don't know which
OsmPrimitive
is causing the error.e
- the exceptionpublic static void explainException(Exception e)
Exception
to the user.e
- the Exception