Table of Contents

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 SerializationInfo

Serialization info.

context StreamingContext

Streaming context.

RemoteRpcException(string?)

Initializes a new instance of the RemoteRpcException class.

protected RemoteRpcException(string? message)

Parameters

message string

The message that describes the error.

RemoteRpcException(string?, Exception?)

Initializes a new instance of the RemoteRpcException class.

protected RemoteRpcException(string? message, Exception? innerException)

Parameters

message string

The error message that explains the reason for the exception.

innerException Exception

The 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

object

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

JsonRpcErrorCode?

ErrorData

Gets or sets the error.data value in the error response, if one was provided.

public object? ErrorData { get; protected set; }

Property Value

object

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 SerializationInfo
context StreamingContext