|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.josm.gui.ExceptionDialogUtil
public class ExceptionDialogUtil
This utility class provides static methods which explain various exceptions to the user.
Constructor Summary | |
---|---|
private |
ExceptionDialogUtil()
just static utility functions. |
Method Summary | ||
---|---|---|
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. |
|
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(java.lang.Exception e)
Explains an Exception to the user. |
|
static void |
explainGeneric(java.lang.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. |
|
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(java.lang.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. |
|
static void |
explainSecurityException(OsmTransferException e)
Explains a SecurityException which has caused an OsmTransferException . |
|
protected static
|
getNestedException(java.lang.Exception e,
java.lang.Class<T> nestedClass)
Replies the first nested exception of type nestedClass (including
the root exception e ) or null, if no such exception is found. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
private ExceptionDialogUtil()
Method Detail |
---|
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(java.lang.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(java.lang.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
request
e
- the exceptionpublic static void explainNotFound(OsmApiException e)
OsmApiException
which was thrown because a resource wasn't found
on the server
e
- the exceptionpublic static void explainConflict(OsmApiException e)
OsmApiException
which was thrown because of a conflict
e
- the exceptionpublic static void explainAuthenticationFailed(OsmApiException e)
OsmApiException
which was thrown because the authentication at
the OSM server failed
e
- the exceptionpublic static void explainAuthorizationFailed(OsmApiException e)
OsmApiException
which was thrown because accessing a protected
resource was forbidden.
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(java.lang.Exception e, java.lang.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 exception
nestedClass
(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(java.lang.Exception e)
Exception
to the user.
e
- the Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |