Class RemoteInvocationException
- Namespace
- StreamJsonRpc
- Assembly
- StreamJsonRpc.dll
Remote RPC exception that indicates that the server target method threw an exception.
[Serializable]
public class RemoteInvocationException : RemoteRpcException, ISerializable
- Inheritance
-
RemoteInvocationException
- Implements
- Inherited Members
Remarks
Constructors
RemoteInvocationException(SerializationInfo, StreamingContext)
Initializes a new instance of the RemoteInvocationException class.
protected RemoteInvocationException(SerializationInfo info, StreamingContext context)
Parameters
info
SerializationInfoSerialization info.
context
StreamingContextStreaming context.
RemoteInvocationException(string?, int, Exception)
Initializes a new instance of the RemoteInvocationException class.
public RemoteInvocationException(string? message, int errorCode, Exception innerException)
Parameters
message
stringThe message.
errorCode
intThe value of the error.code field in the response.
innerException
ExceptionThe deserialized exception thrown by the RPC server.
RemoteInvocationException(string?, int, object?)
Initializes a new instance of the RemoteInvocationException class.
public RemoteInvocationException(string? message, int errorCode, object? errorData)
Parameters
message
stringThe message.
errorCode
intThe value of the error.code field in the response.
errorData
objectThe value of the error.data field in the response.
RemoteInvocationException(string?, int, object?, object?)
Initializes a new instance of the RemoteInvocationException class.
public RemoteInvocationException(string? message, int errorCode, object? errorData, object? deserializedErrorData)
Parameters
message
stringThe message.
errorCode
intThe value of the error.code field in the response.
errorData
objectThe value of the error.data field in the response.
deserializedErrorData
objectThe value of the error.data field in the response, deserialized according to GetErrorDetailsDataType(JsonRpcError).
Properties
DeserializedErrorData
Gets or sets the error.data
value in the error response, if one was provided.
public object? DeserializedErrorData { get; }
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 the value of the error.code
field in the response.
public int ErrorCode { get; }
Property Value
- int
The value may be any integer. The value may be InvocationError, which is a general value used for exceptions thrown on the server when the server does not give an app-specific error code.
ErrorData
Gets or sets the error.data
value in the error response, if one was provided.
public object? ErrorData { get; }
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
ToString()
public override string ToString()