Class LocalRpcException
- Namespace
- StreamJsonRpc
- Assembly
- StreamJsonRpc.dll
An exception that may be thrown within a locally invoked server method, and carries with it data that influences the JSON-RPC error message's error object.
public class LocalRpcException : Exception, ISerializable
- Inheritance
-
LocalRpcException
- Implements
- Inherited Members
Constructors
LocalRpcException()
Initializes a new instance of the LocalRpcException class.
public LocalRpcException()
LocalRpcException(string?)
Initializes a new instance of the LocalRpcException class.
public LocalRpcException(string? message)
Parameters
message
stringThe error message that explains the reason for the exception.
LocalRpcException(string?, Exception?)
Initializes a new instance of the LocalRpcException class.
public LocalRpcException(string? message, Exception? inner)
Parameters
message
stringThe error message that explains the reason for the exception.
inner
ExceptionThe exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.
Properties
ErrorCode
Gets or sets the value for the error.code property.
public int ErrorCode { get; set; }
Property Value
Remarks
The default value is set to a special general error code: InvocationError. This may be set to a more meaningful error code for the application that allows the client to programatically respond to the error condition. Application-defined values should avoid the [-32768, -32000] range, which is reserved for the JSON-RPC protocol itself.
ErrorData
Gets or sets the value for the error.data property.
public object? ErrorData { get; set; }