Package org.openstreetmap.josm.io
Class OsmApiPrimitiveGoneException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.openstreetmap.josm.io.OsmTransferException
org.openstreetmap.josm.io.OsmApiException
org.openstreetmap.josm.io.OsmApiPrimitiveGoneException
- All Implemented Interfaces:
Serializable
Represents an exception thrown by the OSM API if JOSM tries to update or delete a primitive
which is already deleted on the server.
- Since:
- 2198
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe regexp pattern for the error header replied by the OSM APIprivate final longthe id of the primitiveprivate final OsmPrimitiveTypethe type of the primitive which is gone on the server -
Constructor Summary
ConstructorsConstructorDescriptionOsmApiPrimitiveGoneException(String errorHeader, String errorBody) Constructs a newOsmApiPrimitiveGoneException. -
Method Summary
Modifier and TypeMethodDescriptionlongReplies the id of the primitive this exception was thrown for.Replies the type of the primitive this exception was thrown for.booleanReplies true if we know what primitive this exception was thrown forMethods inherited from class org.openstreetmap.josm.io.OsmApiException
getAccessedUrl, getContentType, getDisplayMessage, getErrorBody, getErrorHeader, getLogin, getMessage, getResponseCode, isHtml, setAccessedUrl, setContentType, setErrorBody, setErrorHeader, setLogin, setResponseCodeMethods inherited from class org.openstreetmap.josm.io.OsmTransferException
getUrl, setUrlMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
ERROR_HEADER_PATTERN
The regexp pattern for the error header replied by the OSM API- See Also:
-
type
the type of the primitive which is gone on the server -
id
the id of the primitive
-
-
Constructor Details
-
OsmApiPrimitiveGoneException
Constructs a newOsmApiPrimitiveGoneException.- Parameters:
errorHeader- error headererrorBody- error body
-
-
Method Details
-
isKnownPrimitive
Replies true if we know what primitive this exception was thrown for- Returns:
- true if we know what primitive this exception was thrown for
-
getPrimitiveType
Replies the type of the primitive this exception was thrown for. null, if the type is not known.- Returns:
- the type of the primitive this exception was thrown for
-
getPrimitiveId
Replies the id of the primitive this exception was thrown for. 0, if the id is not known.- Returns:
- the id of the primitive this exception was thrown for
-