java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
tools.jackson.core.JacksonException
tools.jackson.databind.DatabindException
tools.jackson.databind.exc.MismatchedInputException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
InvalidFormatException,InvalidNullException,InvalidTypeIdException,PropertyBindingException
General exception type used as the base class for all
DatabindExceptions
that are due to input not mapping to target definition; these are typically
considered "client errors" since target type definition itself is not the root cause
but mismatching input. This is in contrast to InvalidDefinitionException which
signals a problem with target type definition and not input.
This type is used as-is for some input problems, but in most cases there should be more explicit subtypes to use.
NOTE: name chosen to differ from `java.util.InputMismatchException` since while that would have been better name, use of same overlapping name causes nasty issues with IDE auto-completion, so slightly less optimal chosen.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class tools.jackson.core.JacksonException
JacksonException.Reference -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JsonTokenCurrent token at the point when exception was thrown (if available).protected Class<?>Type of value that was to be deserializedFields inherited from class tools.jackson.core.JacksonException
_location, _path, _processor -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMismatchedInputException(JsonParser p, String msg) protectedMismatchedInputException(JsonParser p, String msg, Class<?> targetType) protectedMismatchedInputException(JsonParser p, String msg, TokenStreamLocation loc) protectedMismatchedInputException(JsonParser p, String msg, JavaType targetType) -
Method Summary
Modifier and TypeMethodDescriptionprotected static JsonTokenstatic MismatchedInputExceptionfrom(JsonParser p, Class<?> targetType, String msg) static MismatchedInputExceptionfrom(JsonParser p, JavaType targetType, String msg) Class<?>Accessor for getting intended target type, with which input did not match, if known; `null` if not known for some reason.Methods inherited from class tools.jackson.databind.DatabindException
from, from, from, from, from, from, from, from, wrapWithPath, wrapWithPathMethods inherited from class tools.jackson.core.JacksonException
_appendPathDesc, _appendReferenceChain, _buildMessage, _exceptionMessage, clearLocation, getLocalizedMessage, getLocation, getMessage, getOriginalMessage, getPath, getPathReference, getPathReference, messageSuffix, prependPath, prependPath, prependPath, processor, toString, withCause, wrapWithPath, wrapWithPath, wrapWithPath, wrapWithPathMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Field Details
-
_targetType
Type of value that was to be deserialized -
_currentToken
Current token at the point when exception was thrown (if available).
-
-
Constructor Details
-
MismatchedInputException
-
MismatchedInputException
-
MismatchedInputException
-
MismatchedInputException
-
-
Method Details
-
_currentToken
-
from
-
from
-
setTargetType
-
setCurrentToken
-
getTargetType
Accessor for getting intended target type, with which input did not match, if known; `null` if not known for some reason. -
getCurrentToken
- Returns:
- Current token at the point when exception was thrown, if available
(
nullif not)
-