java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
tools.jackson.core.JacksonException
tools.jackson.core.exc.StreamReadException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
InputCoercionException,UnexpectedEndOfInputException
Intermediate base class for all read-side streaming processing problems, including
parsing and input value coercion problems.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class tools.jackson.core.JacksonException
JacksonException.Reference -
Field Summary
Fields inherited from class tools.jackson.core.JacksonException
_location, _path, _processor -
Constructor Summary
ConstructorsConstructorDescriptionStreamReadException(JsonParser p, String msg) StreamReadException(JsonParser p, String msg, Throwable rootCause) StreamReadException(JsonParser p, String msg, TokenStreamLocation loc) StreamReadException(JsonParser p, String msg, TokenStreamLocation loc, Throwable rootCause) -
Method Summary
Modifier and TypeMethodDescriptionMethod that allows accessing underlying processor that triggered this exception; typically eitherJsonParserorJsonGeneratorfor exceptions that originate from streaming API, but may be other types when thrown by databinding.Fluent method that may be used to assign originatingJsonParser, to be accessed usingprocessor().Methods inherited from class tools.jackson.core.JacksonException
_appendPathDesc, _appendReferenceChain, _buildMessage, _exceptionMessage, clearLocation, getLocalizedMessage, getLocation, getMessage, getOriginalMessage, getPath, getPathReference, getPathReference, messageSuffix, prependPath, prependPath, prependPath, toString, withCause, wrapWithPath, wrapWithPath, wrapWithPath, wrapWithPathMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
StreamReadException
-
StreamReadException
-
StreamReadException
-
StreamReadException
-
StreamReadException
-
-
Method Details
-
withParser
Fluent method that may be used to assign originatingJsonParser, to be accessed usingprocessor().NOTE:
thisinstance is modified and no new instance is constructed.- Parameters:
p- Parser instance to assign to this exception- Returns:
- This exception instance to allow call chaining
-
processor
Description copied from class:JacksonExceptionMethod that allows accessing underlying processor that triggered this exception; typically eitherJsonParserorJsonGeneratorfor exceptions that originate from streaming API, but may be other types when thrown by databinding.Note that it is possible that
nullmay be returned if code throwing exception either has no access to the processor; or has not been retrofitted to set it; this means that caller needs to take care to check for nulls. Subtypes override this method with co-variant return type, for more type-safe access.NOTE: In Jackson 2.x, accessor was
getProcessor(): in 3.0 changed to non-getter to avoid having to annotate for serialization.- Overrides:
processorin classJacksonException- Returns:
- Originating processor, if available;
nullif not.
-