public class JSONRPC2ParseException extends Exception
| Modifier and Type | Field and Description |
|---|---|
static int | JSONIndicates a parse exception caused by invalid JSON. |
static int | PROTOCOLIndicates a parse exception caused by a JSON message not conforming
to the JSON-RPC 2.0 protocol. |
| Constructor and Description |
|---|
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. |
| Modifier and Type | Method and Description |
|---|---|
int | getCauseType()Gets the parse exception cause type. |
String | getUnparsableString()Gets original string that caused the parse exception (if specified). |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic static final int JSON
public static final int PROTOCOL
public JSONRPC2ParseException(String message)
PROTOCOL.message - The exception message.public JSONRPC2ParseException(String message, int causeType, String unparsableString)
public JSONRPC2ParseException(String message, String unparsableString)
PROTOCOL.message - The exception message.unparsableString - The unparsable string.public int getCauseType()
public String getUnparsableString()
null if none.