com.werxltd.jsonrpc
Class JSONRPCException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.werxltd.jsonrpc.JSONRPCException
- All Implemented Interfaces:
- java.io.Serializable
public class JSONRPCException
- extends java.lang.Exception
A standardized exception class that conforms with JSON-RPC specifications.
- Author:
- Wes Widner
- See Also:
- JSON-RPC
Error Specification,
Serialized Form
|
Method Summary |
long |
getCode()
Get the JSON-RPC error code of this exception. |
void |
setCode(long code)
Set the JSON-RPC error code for this exception |
| 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 |
JSONRPCException
public JSONRPCException()
JSONRPCException
public JSONRPCException(java.lang.String message)
JSONRPCException
public JSONRPCException(java.lang.String message,
long code)
setCode
public void setCode(long code)
- Set the JSON-RPC error code for this exception
- Parameters:
code - The JSON-RPC error code, usually negative in the range of -32768 to -32000 inclusive
getCode
public long getCode()
- Get the JSON-RPC error code of this exception.
- Returns:
- long Error code, usually negative in the range of -32768 to -32000 inclusive
Copyright © 2010. All Rights Reserved.