Top Description Fields Constructors Methods
com.fasterxml.jackson.core

public abstract Class JacksonException

extends IOException
Class Inheritance
Known Direct Subclasses
com.fasterxml.jackson.core.JsonProcessingException

Base class for all Jackson-produced checked exceptions.

For Jackson 2.x this base type is not widely used (instead, its main subtype JsonProcessingException is): it is provided more for forwards-compatibility purposes as 3.x will base all other types directly on it and deprecate JsonProcessingException (as well as chance its type to unchecked).

Since
2.12

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
protected
protected
protected

Method Summary

Modifier and TypeMethod and Description
public abstract JsonLocation

Returns:

Location in input or output that triggered the problem reported, if available; null otherwise.
getLocation
()

Accessor for location information related to position within input or output (depending on operation), if available; if not available may return null.

public abstract String

Returns:

Original, unmodified message argument used to construct this exception instance
getOriginalMessage
()

Method that allows accessing the original "message" argument, without additional decorations (like location information) that overridden getMessage adds.

public abstract Object

Returns:

Originating processor, if available; null if not.
getProcessor
()

Method that allows accessing underlying processor that triggered this exception; typically either JsonParser or JsonGenerator for exceptions that originate from streaming API, but may be other types when thrown by databinding.

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.io.IOException.serialVersionUID.

Constructor Detail

JacksonExceptionback to summary
protected JacksonException(String msg)
JacksonExceptionback to summary
protected JacksonException(Throwable t)
JacksonExceptionback to summary
protected JacksonException(String msg, Throwable rootCause)

Method Detail

getLocationback to summary
public abstract JsonLocation getLocation()

Accessor for location information related to position within input or output (depending on operation), if available; if not available may return null.

Accuracy of location information depends on backend (format) as well as (in some cases) operation being performed.

Returns:JsonLocation

Location in input or output that triggered the problem reported, if available; null otherwise.

getOriginalMessageback to summary
public abstract String getOriginalMessage()

Method that allows accessing the original "message" argument, without additional decorations (like location information) that overridden getMessage adds.

Returns:String

Original, unmodified message argument used to construct this exception instance

getProcessorback to summary
public abstract Object getProcessor()

Method that allows accessing underlying processor that triggered this exception; typically either JsonParser or JsonGenerator for exceptions that originate from streaming API, but may be other types when thrown by databinding.

Note that it is possible that null may 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.

Returns:Object

Originating processor, if available; null if not.