Module tools.jackson.databind
Class DateTimeParseException
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
tools.jackson.databind.ext.javatime.DateTimeParseException
- All Implemented Interfaces:
Serializable
Specialized exception to be thrown when deserialization of
java.time
instances fails due to DateTimeException or related exceptions.
This exception is used to wrap DateTimeExceptions and
ArithmeticExceptions that occur during parsing or construction of
java.time objects (like LocalDateTime, LocalDate,
LocalTime, etc.), providing better error context for Jackson
deserialization failures.
- Since:
- 3.1
- 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 final StringThe value that failed to be parsed into ajava.timeinstance.Fields inherited from class tools.jackson.databind.exc.MismatchedInputException
_currentToken, _targetTypeFields inherited from class tools.jackson.core.JacksonException
_location, _path, _processor -
Constructor Summary
ConstructorsConstructorDescriptionDateTimeParseException(tools.jackson.core.JsonParser p, String msg, String value, Class<?> targetType, Throwable cause) -
Method Summary
Methods inherited from class tools.jackson.databind.exc.MismatchedInputException
_currentToken, from, from, getCurrentToken, getTargetType, setCurrentToken, setTargetTypeMethods 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
-
_value
The value that failed to be parsed into ajava.timeinstance.
-
-
Constructor Details
-
DateTimeParseException
-
-
Method Details
-
from
public static DateTimeParseException from(tools.jackson.core.JsonParser p, String msg, String value, Class<?> targetType, Throwable cause) Factory method for constructing an instance with given arguments.- Parameters:
p- Parser in use when exception occurredmsg- Error messagevalue- The value that could not be parsedtargetType- Type we attempted to deserialize intocause- The underlying exception (typicallyDateTimeExceptionorArithmeticException)- Returns:
- New
DateTimeParseExceptioninstance
-
getValue
Accessor for the value that could not be parsed.- Returns:
- The string value that failed to parse, if available
-