Package org.eclipse.ditto.json
Class JsonKeyInvalidException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.eclipse.ditto.json.JsonRuntimeException
org.eclipse.ditto.json.JsonKeyInvalidException
- All Implemented Interfaces:
Serializable
,JsonException
Thrown if a
JsonKey
was in an invalid format.- Since:
- 1.2.0
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A mutable builder for aJsonKeyInvalidException
. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns a builder for fluently creating instances ofJsonKeyInvalidException
s.newBuilderWithDescription
(CharSequence jsonKey, String description) Returns a new builder containing the given message for the given JSON key.newBuilderWithoutDescription
(CharSequence jsonKey) Returns a new builder already containing a default message that the JSON key is no valid.Methods inherited from class org.eclipse.ditto.json.JsonRuntimeException
getDescription, getErrorCode, getHref, newBuilder
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
ERROR_CODE
Error code of this exception.- See Also:
-
-
Method Details
-
newBuilder
Returns a builder for fluently creating instances ofJsonKeyInvalidException
s.- Returns:
- a new builder for JsonKeyInvalidException objects.
-
newBuilderWithDescription
public static JsonExceptionBuilder<JsonKeyInvalidException> newBuilderWithDescription(CharSequence jsonKey, @Nullable String description) Returns a new builder containing the given message for the given JSON key.- Parameters:
jsonKey
- The JSON key the message is about.description
- The description to be in the exception.- Returns:
- a builder for
JsonKeyInvalidException
objects.
-
newBuilderWithoutDescription
public static JsonExceptionBuilder<JsonKeyInvalidException> newBuilderWithoutDescription(CharSequence jsonKey) Returns a new builder already containing a default message that the JSON key is no valid.- Parameters:
jsonKey
- The JSON key the message is about.- Returns:
- a builder for
JsonKeyInvalidException
objects. - Since:
- 1.2.0
-