public class JSONParseException extends JSONException
Constructor and Description |
---|
JSONParseException(java.lang.String message,
ParsePosition pos)
Constructs a JSONParseException with an explanatory message and
parse position.
|
JSONParseException(java.lang.String message,
java.lang.Throwable cause,
ParsePosition pos)
Constructs a JSONParseException with an explanatory message, cause,
and parse position.
|
JSONParseException(java.lang.Throwable cause,
ParsePosition pos)
Constructs a new JSONParseException with the specified cause and
parse position.
|
Modifier and Type | Method and Description |
---|---|
ParsePosition |
getPosition()
Return the parse position where the error occured as a
ParsePosition object. |
java.lang.String |
getPositionDetails()
Get a String representation of the parse position where the error
occurred.
|
public JSONParseException(java.lang.String message, ParsePosition pos)
message
- Detail about the reason for the exception.pos
- the current position of the Scanner
where the
error occurredpublic JSONParseException(java.lang.String message, java.lang.Throwable cause, ParsePosition pos)
message
- Detail about the reason for the exception.cause
- The cause.pos
- the current position of the Scanner
where the
error occurredpublic JSONParseException(java.lang.Throwable cause, ParsePosition pos)
cause
- The cause.pos
- the current position of the Scanner
where the
error occurredpublic ParsePosition getPosition()
ParsePosition
object.public java.lang.String getPositionDetails()