Package rife.json
Class JsonParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
rife.json.JsonParseException
- All Implemented Interfaces:
Serializable
A
JsonParseException is thrown when a JSON document couldn't be
parsed.
The line and the column where the parsing went wrong are part of the message of the exception and can also be retrieved individually, so that you can point at the exact location of the problem.
- Since:
- 1.10
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionJsonParseException(String message, int line, int column) Creates a new parse exception. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
JsonParseException
Creates a new parse exception.The line and column numbers that you provide are appended to the message so that the location of the problem is always part of the description of the exception.
- Parameters:
message- the description of the parse problemline- the line number where the problem occurredcolumn- the column number where the problem occurred- Since:
- 1.10
- See Also:
-
-
Method Details
-
getLine
public int getLine()Retrieves the line number where the parse problem occurred.- Returns:
- the line number, starting at
1 - Since:
- 1.10
- See Also:
-
getColumn
public int getColumn()Retrieves the column number where the parse problem occurred.- Returns:
- the column number, starting at
1 - Since:
- 1.10
- See Also:
-