Package com.fasterxml.jackson.jr.ob
Class JSONObjectException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
com.fasterxml.jackson.core.JacksonException
com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.jr.ob.JSONObjectException
- All Implemented Interfaces:
Serializable
public class JSONObjectException
extends com.fasterxml.jackson.core.JsonProcessingException
Standard exception exposed by this package; equivalent of
com.fasterxml.jackson.databind.JsonMappingException
(and, in fact, much of implementation came from that class, but
had to be cut-n-pasted since we do not depend on databind package).- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSimple bean class used to contain references. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected LinkedList<JSONObjectException.Reference>Path through which problem that triggering throwing of this exception was reached.Fields inherited from class com.fasterxml.jackson.core.JsonProcessingException
_location -
Constructor Summary
ConstructorsConstructorDescriptionJSONObjectException(String msg, com.fasterxml.jackson.core.JsonLocation loc) JSONObjectException(String msg, com.fasterxml.jackson.core.JsonLocation loc, Throwable rootCause) JSONObjectException(String msg, Throwable rootCause) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected Stringstatic JSONObjectExceptionstatic JSONObjectExceptionstatic JSONObjectExceptionstatic JSONObjectExceptionFactory method used when "upgrading" anIOExceptionintoJSONObjectException: usually only needed to comply with a signature.Method is overridden so that we can properly inject description of problem path, if such is defined.getPath()Method for accessing full structural path within type hierarchy down to problematic property.Method for accesing description of path that lead to the problem that triggered this exceptionvoidvoidprependPath(Object referrer, int index) Method called to prepend a reference information in front of current pathvoidprependPath(Object referrer, String fieldName) Method called to prepend a reference information in front of current pathtoString()static JSONObjectExceptionMethod that can be called to either create a new JsonMappingException (if underlying exception is not a JsonMappingException), or augment given exception with given path/reference information.static JSONObjectExceptionwrapWithPath(Throwable src, Object refFrom, int index) Method that can be called to either create a new JsonMappingException (if underlying exception is not a JsonMappingException), or augment given exception with given path/reference information.static JSONObjectExceptionwrapWithPath(Throwable src, Object refFrom, String refFieldName) Method that can be called to either create a new JsonMappingException (if underlying exception is not a JsonMappingException), or augment given exception with given path/reference information.Methods inherited from class com.fasterxml.jackson.core.JsonProcessingException
clearLocation, getLocation, getMessageSuffix, getOriginalMessage, getProcessorMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Field Details
-
_path
Path through which problem that triggering throwing of this exception was reached.
-
-
Constructor Details
-
JSONObjectException
-
JSONObjectException
-
JSONObjectException
-
JSONObjectException
-
-
Method Details
-
from
-
from
public static JSONObjectException from(com.fasterxml.jackson.core.JsonParser p, String msg, Object... args) -
from
public static JSONObjectException from(com.fasterxml.jackson.core.JsonParser p, Throwable problem, String msg, Object... args) -
fromUnexpectedIOE
Factory method used when "upgrading" anIOExceptionintoJSONObjectException: usually only needed to comply with a signature. -
wrapWithPath
Method that can be called to either create a new JsonMappingException (if underlying exception is not a JsonMappingException), or augment given exception with given path/reference information. This version of method is called when the reference is through a non-indexed object, such as a Map or POJO/bean. -
wrapWithPath
Method that can be called to either create a new JsonMappingException (if underlying exception is not a JsonMappingException), or augment given exception with given path/reference information. This version of method is called when the reference is through an index, which happens with arrays and Collections. -
wrapWithPath
Method that can be called to either create a new JsonMappingException (if underlying exception is not a JsonMappingException), or augment given exception with given path/reference information. -
getPath
Method for accessing full structural path within type hierarchy down to problematic property. -
getPathReference
Method for accesing description of path that lead to the problem that triggered this exception -
getPathReference
-
prependPath
Method called to prepend a reference information in front of current path -
prependPath
Method called to prepend a reference information in front of current path -
prependPath
-
getLocalizedMessage
- Overrides:
getLocalizedMessagein classThrowable
-
getMessage
Method is overridden so that we can properly inject description of problem path, if such is defined.- Overrides:
getMessagein classcom.fasterxml.jackson.core.JsonProcessingException
-
_buildMessage
-
toString
- Overrides:
toStringin classcom.fasterxml.jackson.core.JsonProcessingException
-
_appendPathDesc
-