org.less4j
Class JSONR.Error
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.less4j.JSON.Error
org.less4j.JSONR.Error
- All Implemented Interfaces:
- java.io.Serializable
- Enclosing class:
- JSONR
public static class JSONR.Error
- extends JSON.Error
A simple JSONR exception throwed for any type or value error found
by the regular interpreter.
Synopsis
This class is a shallow copy of JSON.Error to distinguish between
a syntax and a regular error, allowing the interpreter to recover
valid JSON from an invalid JSONR (ie: to do error handling).
String model = "[[true , \"[a-z]+\", null]]";
String string = "[[false, \"test\", 1.0][true, \"ERROR\" {}]]";
try {
Object json = JSONR(model).eval(string)
} catch (JSONR.Error e) {
System.out.println(e.jstr())
} catch (JSON.Error e) {
System.out.println(e.jstr())
}
Copyright © 2006 Laurent A.V. Szyster
- Version:
- 0.30
- See Also:
- Serialized Form
|
Constructor Summary |
JSONR.Error(java.lang.String message)
Instanciate a JSONR error with an error message. |
|
Method Summary |
java.lang.String |
toString()
... |
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
JSONR.Error
public JSONR.Error(java.lang.String message)
- Instanciate a JSONR error with an error message.
- Parameters:
message - the error message
toString
public java.lang.String toString()
- ...
- Overrides:
toString in class JSON.Error