|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception com.thetransactioncompany.jsonrpc2.JSONRPC2ParseException
public class JSONRPC2ParseException
Thrown to indicate an exception during the parsing of a JSON-RPC 2.0 message string.
The JSON-RPC 2.0 specification and user group forum can be found here.
Field Summary | |
---|---|
static int |
JSON
Indicates a parse exception caused by invalid JSON. |
static int |
PROTOCOL
Indicates a parse exception caused by a JSON message not conforming to the JSON-RPC 2.0 protocol. |
Constructor Summary | |
---|---|
JSONRPC2ParseException(String message)
Creates a new parse exception with the specified message. |
|
JSONRPC2ParseException(String message,
int causeType,
String unparsableString)
Creates a new parse exception with the specified message, cause type and the original string that didn't parse. |
|
JSONRPC2ParseException(String message,
String unparsableString)
Creates a new parse exception with the specified message and the original string that didn't parse. |
Method Summary | |
---|---|
int |
getCauseType()
Gets the parse exception cause type. |
String |
getUnparsableString()
Gets original string that caused the parse exception (if specified). |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static int PROTOCOL
public static int JSON
Constructor Detail |
---|
public JSONRPC2ParseException(String message)
PROTOCOL
.
message
- The exception message.public JSONRPC2ParseException(String message, String unparsableString)
PROTOCOL
.
message
- The exception message.unparsableString
- The unparsable string.public JSONRPC2ParseException(String message, int causeType, String unparsableString)
message
- The exception message.causeType
- The exception cause type, either
PROTOCOL
or JSON
.unparsableString
- The unparsable string.Method Detail |
---|
public int getCauseType()
PROTOCOL
or JSON
.public String getUnparsableString()
null
if none.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |