|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.io.IOException
com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.jr.ob.JSONObjectException
public class JSONObjectException
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).
Nested Class Summary | |
---|---|
static class |
JSONObjectException.Reference
Simple bean class used to contain references. |
Field Summary | |
---|---|
protected LinkedList<JSONObjectException.Reference> |
_path
Path through which problem that triggering throwing of this exception was reached. |
Fields inherited from class com.fasterxml.jackson.core.JsonProcessingException |
---|
_location |
Constructor Summary | |
---|---|
JSONObjectException(String msg)
|
|
JSONObjectException(String msg,
JsonLocation loc)
|
|
JSONObjectException(String msg,
JsonLocation loc,
Throwable rootCause)
|
|
JSONObjectException(String msg,
Throwable rootCause)
|
Method Summary | |
---|---|
protected void |
_appendPathDesc(StringBuilder sb)
|
protected String |
_buildMessage()
|
static JSONObjectException |
from(JsonParser jp,
String msg)
|
static JSONObjectException |
from(JsonParser jp,
String msg,
Throwable problem)
|
static JSONObjectException |
fromUnexpectedIOE(IOException src)
Factory method used when "upgrading" an IOException into
JSONObjectException : usually only needed to comply with
a signature. |
String |
getLocalizedMessage()
|
String |
getMessage()
Method is overridden so that we can properly inject description of problem path, if such is defined. |
List<JSONObjectException.Reference> |
getPath()
Method for accessing full structural path within type hierarchy down to problematic property. |
String |
getPathReference()
Method for accesing description of path that lead to the problem that triggered this exception |
StringBuilder |
getPathReference(StringBuilder sb)
|
void |
prependPath(JSONObjectException.Reference r)
|
void |
prependPath(Object referrer,
int index)
Method called to prepend a reference information in front of current path |
void |
prependPath(Object referrer,
String fieldName)
Method called to prepend a reference information in front of current path |
String |
toString()
|
static JSONObjectException |
wrapWithPath(Throwable src,
JSONObjectException.Reference ref)
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 JSONObjectException |
wrapWithPath(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 JSONObjectException |
wrapWithPath(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 |
---|
getLocation, getMessageSuffix, getOriginalMessage, getProcessor |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected LinkedList<JSONObjectException.Reference> _path
Constructor Detail |
---|
public JSONObjectException(String msg)
public JSONObjectException(String msg, Throwable rootCause)
public JSONObjectException(String msg, JsonLocation loc)
public JSONObjectException(String msg, JsonLocation loc, Throwable rootCause)
Method Detail |
---|
public static JSONObjectException from(JsonParser jp, String msg)
public static JSONObjectException from(JsonParser jp, String msg, Throwable problem)
public static JSONObjectException fromUnexpectedIOE(IOException src)
IOException
into
JSONObjectException
: usually only needed to comply with
a signature.
public static JSONObjectException wrapWithPath(Throwable src, Object refFrom, String refFieldName)
public static JSONObjectException wrapWithPath(Throwable src, Object refFrom, int index)
public static JSONObjectException wrapWithPath(Throwable src, JSONObjectException.Reference ref)
public List<JSONObjectException.Reference> getPath()
public String getPathReference()
public StringBuilder getPathReference(StringBuilder sb)
public void prependPath(Object referrer, String fieldName)
public void prependPath(Object referrer, int index)
public void prependPath(JSONObjectException.Reference r)
public String getLocalizedMessage()
getLocalizedMessage
in class Throwable
public String getMessage()
getMessage
in class JsonProcessingException
protected String _buildMessage()
public String toString()
toString
in class JsonProcessingException
protected void _appendPathDesc(StringBuilder sb)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |