Class JsonRpcException
- Namespace
- Nerdbank.JsonRpc
- Assembly
- Nerdbank.JsonRpc.dll
Represents a JSON-RPC error response.
public class JsonRpcException : Exception, ISerializable
- Inheritance
-
JsonRpcException
- Implements
- Derived
- Inherited Members
Remarks
Throw this exception from an RPC target method to send ErrorDetails as the error response.
Constructors
JsonRpcException(JsonRpcErrorDetails)
Initializes a new instance of the JsonRpcException class.
public JsonRpcException(JsonRpcErrorDetails errorDetails)
Parameters
errorDetailsJsonRpcErrorDetailsThe JSON-RPC error details.
JsonRpcException(JsonRpcErrorDetails, Exception?)
Initializes a new instance of the JsonRpcException class.
public JsonRpcException(JsonRpcErrorDetails errorDetails, Exception? innerException)
Parameters
errorDetailsJsonRpcErrorDetailsThe JSON-RPC error details.
innerExceptionExceptionThe exception that caused this exception.
Properties
ErrorDetails
Gets the JSON-RPC error details.
public JsonRpcErrorDetails ErrorDetails { get; }