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:
DateTimeParseException,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
tools.jackson.core.JacksonException.Reference -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected tools.jackson.core.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(tools.jackson.core.JsonParser p, String msg) protectedMismatchedInputException(tools.jackson.core.JsonParser p, String msg, Class<?> targetType) protectedMismatchedInputException(tools.jackson.core.JsonParser p, String msg, tools.jackson.core.TokenStreamLocation loc) protectedMismatchedInputException(tools.jackson.core.JsonParser p, String msg, JavaType targetType) -
Method Summary
Modifier and TypeMethodDescriptionprotected static tools.jackson.core.JsonToken_currentToken(tools.jackson.core.JsonParser p) static MismatchedInputExceptionstatic MismatchedInputExceptiontools.jackson.core.JsonTokenClass<?>Accessor for getting intended target type, with which input did not match, if known; `null` if not known for some reason.setCurrentToken(tools.jackson.core.JsonToken t) 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
protected tools.jackson.core.JsonToken _currentTokenCurrent token at the point when exception was thrown (if available).
-
-
Constructor Details
-
MismatchedInputException
-
MismatchedInputException
protected MismatchedInputException(tools.jackson.core.JsonParser p, String msg, tools.jackson.core.TokenStreamLocation loc) -
MismatchedInputException
-
MismatchedInputException
-
-
Method Details
-
_currentToken
protected static tools.jackson.core.JsonToken _currentToken(tools.jackson.core.JsonParser p) -
from
public static MismatchedInputException from(tools.jackson.core.JsonParser p, JavaType targetType, String msg) -
from
public static MismatchedInputException from(tools.jackson.core.JsonParser p, Class<?> targetType, String msg) -
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
public tools.jackson.core.JsonToken getCurrentToken()- Returns:
- Current token at the point when exception was thrown, if available
(
nullif not)
-