public class JSONException extends RuntimeException
| code(range) | error code | description |
|---|---|---|
| 000-099 | (all) | reserved. |
| 100-199 | 100 | fails to format. |
| 150 | fails to preformat. | |
| (others) | reserved. | |
| 200-299 | 200 | fails to parse. |
| 250 | fails to postparse. | |
| (others) | reserved. | |
| 300-899 | (all) | reserved. |
| 900- | (all) | user's area. |
| Modifier and Type | Field and Description |
|---|---|
static int |
FORMAT_ERROR |
static int |
PARSE_ERROR |
static int |
POSTPARSE_ERROR |
static int |
PREFORMAT_ERROR |
| Constructor and Description |
|---|
JSONException(String message,
int id) |
JSONException(String message,
int id,
long lineNumber,
long columnNumber,
long offset) |
JSONException(String message,
int id,
Throwable cause) |
| Modifier and Type | Method and Description |
|---|---|
long |
getColumnNumber()
Returns the column number where the error was found.
|
int |
getErrorCode() |
long |
getErrorOffset()
Returns the offset in line where the error was found.
|
long |
getLineNumber()
Returns the line number where the error was found.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic static final int FORMAT_ERROR
public static final int PREFORMAT_ERROR
public static final int PARSE_ERROR
public static final int POSTPARSE_ERROR
public JSONException(String message, int id, long lineNumber, long columnNumber, long offset)
public JSONException(String message, int id)
public int getErrorCode()
public long getLineNumber()
public long getColumnNumber()
public long getErrorOffset()