Note that in Jackson 2.x this exception extended java.
but in 3.x RuntimeException
| Modifier and Type | Class and Description |
|---|---|
| public static class | JacksonException.
Simple bean class used to contain references. |
| Modifier and Type | Field and Description |
|---|---|
| protected TokenStreamLocation | |
| protected LinkedList | _path
Path through which problem that triggering throwing of this exception was reached. |
| protected transient Closeable | _processor
Underlying processor ( |
| private static final int | MAX_REFS_TO_LIST
Let's limit length of reference chain, to limit damage in cases of infinite recursion. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | |
| protected | |
| protected | |
| protected | |
| protected | |
| protected | |
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected StringBuilder | |
| protected StringBuilder | |
| protected String | Returns: Message constructed based on possible optional prefix; explicitmessage passed to constructor as well trailing location description
(separate from message by linefeed)Default method overridden so that we can add location information |
| public static String | |
| private static TokenStreamLocation | |
| public JacksonException | Returns: This exception instance to allow call chainingMethod that allows to remove context information from this exception's message. |
| public String | getLocalizedMessage()
Overrides java. Creates a localized description of this throwable. |
| public TokenStreamLocation | Returns: Location in input or output that triggered the problem reported, if available;null otherwise.Accessor for location information related to position within input
or output (depending on operation), if available; if not available
may return |
| public String | getMessage()
Overrides java. Method is overridden so that we can properly inject description of problem path, if such is defined. |
| public String | Returns: Original, unmodifiedmessage argument used to construct
this exception instanceMethod that allows accessing the original "message" argument,
without additional decorations (like location information)
that overridden |
| public List | getPath()
Method for accessing full structural path within type hierarchy down to problematic property. |
| public String | getPathReference()
Method for accessing description of path that lead to the problem that triggered this exception |
| public StringBuilder | |
| protected String | Returns: Message suffix configured to be used, if any;null if noneAccessor that sub-classes can override to append additional information right after the main message, but before source location information. |
| public JacksonException | prependPath(Object referrer, String propertyName)
Method called to prepend a reference information in front of current path |
| public JacksonException | prependPath(Object referrer, int index)
Method called to prepend a reference information in front of current path |
| public JacksonException | |
| public Object | Returns: Originating processor, if available;null if not.Method that allows accessing underlying processor that triggered
this exception; typically either |
| public String | |
| public JacksonException | |
| public static JacksonException | wrapWithPath(Throwable src, Object refFrom, String refPropertyName)
Method that can be called to either create a new |
| public static JacksonException | wrapWithPath(Throwable src, Object refFrom, int index)
Method that can be called to either create a new |
| public static JacksonException | wrapWithPath(Throwable src, JacksonException.
Method that can be called to either create a new |
| public static JacksonException | wrapWithPath(Throwable src, JacksonException.
|
| _location | back to summary |
|---|---|
| protected TokenStreamLocation _location | |
| _path | back to summary |
|---|---|
| protected LinkedList<JacksonException. Path through which problem that triggering throwing of this exception was reached. | |
| _processor | back to summary |
|---|---|
| protected transient Closeable _processor Underlying processor ( Note typically not serializable hence | |
| MAX_REFS_TO_LIST | back to summary |
|---|---|
| private static final int MAX_REFS_TO_LIST Let's limit length of reference chain, to limit damage in cases of infinite recursion. Use maximum nesting limit allowed for reads. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| JacksonException | back to summary |
|---|---|
| protected JacksonException(String msg) | |
| JacksonException | back to summary |
|---|---|
| protected JacksonException(Throwable rootCause) | |
| JacksonException | back to summary |
|---|---|
| protected JacksonException(String msg, Throwable rootCause) | |
| JacksonException | back to summary |
|---|---|
| protected JacksonException(String msg, TokenStreamLocation loc, Throwable rootCause) | |
| JacksonException | back to summary |
|---|---|
| protected JacksonException(Closeable processor, Throwable rootCause) | |
| JacksonException | back to summary |
|---|---|
| protected JacksonException(Closeable processor, String msg, TokenStreamLocation loc, Throwable rootCause) | |
| JacksonException | back to summary |
|---|---|
| protected JacksonException(Closeable processor, String msg) | |
| JacksonException | back to summary |
|---|---|
| protected JacksonException(Closeable processor, String msg, Throwable problem) | |
| JacksonException | back to summary |
|---|---|
| protected JacksonException(Closeable processor, String msg, TokenStreamLocation loc) | |
| _appendPathDesc | back to summary |
|---|---|
| protected StringBuilder _appendPathDesc(StringBuilder sb) | |
| _appendReferenceChain | back to summary |
|---|---|
| protected StringBuilder _appendReferenceChain(StringBuilder sb) | |
| _buildMessage | back to summary |
|---|---|
| protected String _buildMessage() Default method overridden so that we can add location information
| |
| _exceptionMessage | back to summary |
|---|---|
| public static String _exceptionMessage(Throwable t) | |
| _nonNullLocation | back to summary |
|---|---|
| private static TokenStreamLocation _nonNullLocation(TokenStreamLocation loc) | |
| clearLocation | back to summary |
|---|---|
| public JacksonException clearLocation() Method that allows to remove context information from this exception's message. Useful when you are parsing security-sensitive data and don't want original data excerpts to be present in Jackson parser error messages.
| |
| getLocalizedMessage | back to summary |
|---|---|
| public String getLocalizedMessage() Overrides java. Doc from java. Creates a localized description of this throwable.
Subclasses may override this method in order to produce a
locale-specific message. For subclasses that do not override this
method, the default implementation returns the same result as
| |
| getLocation | back to summary |
|---|---|
| public TokenStreamLocation getLocation() Accessor for location information related to position within input
or output (depending on operation), if available; if not available
may return Accuracy of location information depends on backend (format) as well as (in some cases) operation being performed.
| |
| getMessage | back to summary |
|---|---|
| public String getMessage() Overrides java. Method is overridden so that we can properly inject description of problem path, if such is defined.
| |
| getOriginalMessage | back to summary |
|---|---|
| public String getOriginalMessage() Method that allows accessing the original "message" argument,
without additional decorations (like location information)
that overridden
| |
| getPath | back to summary |
|---|---|
| public List Method for accessing full structural path within type hierarchy down to problematic property. | |
| getPathReference | back to summary |
|---|---|
| public String getPathReference() Method for accessing description of path that lead to the problem that triggered this exception | |
| getPathReference | back to summary |
|---|---|
| public StringBuilder getPathReference(StringBuilder sb) | |
| messageSuffix | back to summary |
|---|---|
| protected String messageSuffix() Accessor that sub-classes can override to append additional information right after the main message, but before source location information. Note In Jackson 2.x, accessor was
| |
| prependPath | back to summary |
|---|---|
| public JacksonException prependPath(Object referrer, String propertyName) Method called to prepend a reference information in front of current path | |
| prependPath | back to summary |
|---|---|
| public JacksonException prependPath(Object referrer, int index) Method called to prepend a reference information in front of current path | |
| prependPath | back to summary |
|---|---|
| public JacksonException prependPath(JacksonException. | |
| processor | back to summary |
|---|---|
| public Object processor() Method that allows accessing underlying processor that triggered
this exception; typically either
Note that it is possible that Note In Jackson 2.x, accessor was
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a short description of this throwable. The result is the concatenation of:
getLocalizedMessage returns null, then just
the class name is returned.
| |
| withCause | back to summary |
|---|---|
| public JacksonException withCause(Throwable cause) | |
| wrapWithPath | back to summary |
|---|---|
| public static JacksonException wrapWithPath(Throwable src, Object refFrom, String refPropertyName) Method that can be called to either create a new | |
| wrapWithPath | back to summary |
|---|---|
| public static JacksonException wrapWithPath(Throwable src, Object refFrom, int index) Method that can be called to either create a new | |
| wrapWithPath | back to summary |
|---|---|
| public static JacksonException wrapWithPath(Throwable src, JacksonException. Method that can be called to either create a new
| |
| wrapWithPath | back to summary |
|---|---|
| public static JacksonException wrapWithPath(Throwable src, JacksonException. | |
| Modifier and Type | Field and Description |
|---|---|
| protected String | |
| protected transient Object | |
| protected int | _index
Index within a |
| protected String | _propertyName
Name of property (for POJO) or key (for Maps) that is part of the reference. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | |
| public String | |
| public int | |
| public String | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| public String | |
| pack-priv Object |
| _desc | back to summary |
|---|---|
| protected String _desc Lazily-constructed description of this instance; needed mostly to
allow JDK serialization to work in case where | |
| _from | back to summary |
|---|---|
| protected transient Object _from | |
| _index | back to summary |
|---|---|
| protected int _index Index within a | |
| _propertyName | back to summary |
|---|---|
| protected String _propertyName Name of property (for POJO) or key (for Maps) that is part
of the reference. May be null for Collection types (which
generally have | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| Reference | back to summary |
|---|---|
| protected Reference() Default constructor for deserialization purposes | |
| Reference | back to summary |
|---|---|
| public Reference(Object from) | |
| Reference | back to summary |
|---|---|
| public Reference(Object from, String propertyName) | |
| Reference | back to summary |
|---|---|
| public Reference(Object from, int index) | |
| from | back to summary |
|---|---|
| public Object from() Object through which reference was resolved. Can be either actual instance (usually the case for serialization), or Class (usually the case for deserialization). Note that this the accessor is not a getter on purpose as we cannot (in general) serialize/deserialize this reference | |
| getDescription | back to summary |
|---|---|
| public String getDescription() | |
| getIndex | back to summary |
|---|---|
| public int getIndex() | |
| getPropertyName | back to summary |
|---|---|
| public String getPropertyName() | |
| setDescription | back to summary |
|---|---|
| pack-priv void setDescription(String d) | |
| setIndex | back to summary |
|---|---|
| pack-priv void setIndex(int ix) | |
| setPropertyName | back to summary |
|---|---|
| pack-priv void setPropertyName(String n) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| writeReplace | back to summary |
|---|---|
| pack-priv Object writeReplace() May need some cleaning here, given that `from` may or may not be serializable. | |