Class RemoteRpcException
- Namespace
- StreamJsonRpc
- Assembly
- StreamJsonRpc.dll
Base exception class for any exception that happens while receiving an JSON-RPC communication.
[Serializable]
public abstract class RemoteRpcException : Exception, ISerializable
- Inheritance
-
RemoteRpcException
- Implements
- Derived
- Inherited Members
Constructors
RemoteRpcException(SerializationInfo, StreamingContext)
Initializes a new instance of the RemoteRpcException class.
protected RemoteRpcException(SerializationInfo info, StreamingContext context)
Parameters
info
SerializationInfoSerialization info.
context
StreamingContextStreaming context.
RemoteRpcException(string?)
Initializes a new instance of the RemoteRpcException class.
protected RemoteRpcException(string? message)
Parameters
message
stringThe message that describes the error.
RemoteRpcException(string?, Exception?)
Initializes a new instance of the RemoteRpcException class.
protected RemoteRpcException(string? message, Exception? innerException)
Parameters
message
stringThe error message that explains the reason for the exception.
innerException
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
DeserializedErrorData
Gets or sets the error.data
value in the error response, if one was provided.
public object? DeserializedErrorData { get; protected set; }
Property Value
Remarks
The type of this object is determined by GetErrorDetailsDataType(JsonRpcError). The default implementation of this method produces a CommonErrorData object.
ErrorCode
Gets or sets the value of the error.code
field in the response, if one is available.
public JsonRpcErrorCode? ErrorCode { get; protected set; }
Property Value
ErrorData
Gets or sets the error.data
value in the error response, if one was provided.
public object? ErrorData { get; protected set; }
Property Value
Remarks
Depending on the IJsonRpcMessageFormatter used, the value of this property, if any, may be a Newtonsoft.Json.Linq.JToken or a deserialized object. If a deserialized object, the type of this object is determined by GetErrorDetailsDataType(JsonRpcError). The default implementation of this method produces a CommonErrorData object.
Methods
GetObjectData(SerializationInfo, StreamingContext)
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
info
SerializationInfocontext
StreamingContext