public class JSONRPC2SessionException extends Exception
Modifier and Type | Field and Description |
---|---|
static int |
BAD_RESPONSE
Invalid JSON-RPC 2.0 response (invalid JSON or invalid JSON-RPC 2.0
response message).
|
static int |
JSONRPC2_ERROR
Received a JSON-RPC 2.0 error response.
|
static int |
NETWORK_EXCEPTION
The exception cause is network or I/O related.
|
static int |
UNEXPECTED_CONTENT_TYPE
Unexpected "Content-Type" header value of the HTTP response.
|
static int |
UNEXPECTED_RESULT
Unexpected JSON-RPC 2.0 response result (the result doesn't match the
JSON type / format expected by the client).
|
static int |
UNSPECIFIED
Unspecified cause type.
|
Constructor and Description |
---|
JSONRPC2SessionException(String message)
Creates a new JSON-RPC 2.0 session exception with the specified
message; the cause type is
UNSPECIFIED . |
JSONRPC2SessionException(String message,
int causeType)
Creates a new JSON-RPC 2.0 session exception with the specified
message and cause type.
|
JSONRPC2SessionException(String message,
int causeType,
Throwable cause)
Creates a new JSON-RPC 2.0 session exception with the specified
message, cause type and cause.
|
Modifier and Type | Method and Description |
---|---|
int |
getCauseType()
Returns the exception cause type.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public static final int UNSPECIFIED
public static final int NETWORK_EXCEPTION
public static final int UNEXPECTED_CONTENT_TYPE
public static final int BAD_RESPONSE
public static final int UNEXPECTED_RESULT
public static final int JSONRPC2_ERROR
public JSONRPC2SessionException(String message)
UNSPECIFIED
.message
- The message.public JSONRPC2SessionException(String message, int causeType)
message
- The message.causeType
- The cause type, see the constants.public JSONRPC2SessionException(String message, int causeType, Throwable cause)
message
- The message.causeType
- The cause type, see the constants.cause
- The original exception.public int getCauseType()
Copyright © 2016 The Transaction Company. All Rights Reserved.