Package org.apache.juneau.bean.jsonrpc
Class JsonRpcError
java.lang.Object
org.apache.juneau.bean.jsonrpc.JsonRpcError
JSON-RPC 2.0 error object.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetCode()Error code.getData()Optional structured error data.Error message.setCode(int value) Sets the error code.Sets optional structured error data.setMessage(String value) Sets the error message.
-
Constructor Details
-
JsonRpcError
public JsonRpcError()
-
-
Method Details
-
getCode
Error code.- Returns:
- The code.
-
setCode
Sets the error code.- Parameters:
value- The new value.- Returns:
- This object (for method chaining).
-
getMessage
Error message.- Returns:
- The message, or
nullif not set.
-
setMessage
Sets the error message.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object (for method chaining).
-
getData
Optional structured error data.- Returns:
- The data, or
nullif not set.
-
setData
Sets optional structured error data.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object (for method chaining).
-