Class JsonRpcException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
JsonRpcErrorException
,JsonRpcStatusException
The JsonRpcErrorException
subclass includes a JsonRpcError
object which can be used
in server implementations to pass error information to the server's response serialization layer which
can include the JsonRpcError
in the JsonRpcResponse
and in client implementations it can
be used for a client to find the JsonRpcError
that was returned.
The JsonRpcStatusException
subclass contains support for HTTP response code and message.
TODO: Rethink the differences between the two subclasses in light of Bitcoin (and possibly other) implementations returning HTTP status codes along with JsonRpcError responses. Bitcoin even incorrectly returns a 500 for invalid parameters. I think I originally assumed that there would be either an HTTP status error or a JSON-RPC error, but in reality responses can probably have neither, either, or both.
- See Also:
-
Constructor Summary
ConstructorDescriptionJsonRpcException
(String message) JsonRpcException
(String message, Throwable cause) -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
JsonRpcException
-
JsonRpcException
-