public class JsonParseException extends JsonProcessingException
Modifier and Type | Field and Description |
---|---|
protected JsonParser |
_processor |
_location
Constructor and Description |
---|
JsonParseException(JsonParser p,
String msg)
Constructor that uses current parsing location as location, and
sets processor (accessible via
getProcessor() ) to
specified parser. |
JsonParseException(JsonParser p,
String msg,
JsonLocation loc) |
JsonParseException(JsonParser p,
String msg,
JsonLocation loc,
Throwable root) |
JsonParseException(JsonParser p,
String msg,
Throwable root) |
JsonParseException(String msg,
JsonLocation loc)
Deprecated.
|
JsonParseException(String msg,
JsonLocation loc,
Throwable root)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
JsonParser |
getProcessor()
Method that allows accessing underlying processor that triggered
this exception; typically either
JsonParser or JsonGenerator
for exceptions that originate from streaming API. |
JsonParseException |
withParser(JsonParser p)
Fluent method that may be used to assign originating
JsonParser ,
to be accessed using getProcessor() . |
getLocation, getMessage, getMessageSuffix, getOriginalMessage, toString
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
protected JsonParser _processor
@Deprecated public JsonParseException(String msg, JsonLocation loc)
@Deprecated public JsonParseException(String msg, JsonLocation loc, Throwable root)
public JsonParseException(JsonParser p, String msg)
getProcessor()
) to
specified parser.public JsonParseException(JsonParser p, String msg, Throwable root)
public JsonParseException(JsonParser p, String msg, JsonLocation loc)
public JsonParseException(JsonParser p, String msg, JsonLocation loc, Throwable root)
public JsonParseException withParser(JsonParser p)
JsonParser
,
to be accessed using getProcessor()
.public JsonParser getProcessor()
JsonProcessingException
JsonParser
or JsonGenerator
for exceptions that originate from streaming API.
Note that it is possible that `null` may be returned if code throwing
exception either has no access to 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.getProcessor
in class JsonProcessingException
Copyright © 2008-2016 FasterXML. All Rights Reserved.