public class JSONRPC2ParseException extends Exception
Modifier and Type | Field and Description |
---|---|
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 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, toString
public static final int PROTOCOL
public static final int JSON
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)
public int getCauseType()
public String getUnparsableString()
null
if none.Copyright © 2015 The Transaction Company. All Rights Reserved.