JsonRpc.CreateExceptionFromRpcError(JsonRpcRequest, JsonRpcError) 方法

定义

创建表示 RemoteRpcException JSON-RPC 错误响应中找到的数据的 (或派生类型) 。 这会在客户端上调用,以生成将抛回到 RPC 客户端的异常。

protected virtual StreamJsonRpc.RemoteRpcException CreateExceptionFromRpcError (StreamJsonRpc.Protocol.JsonRpcRequest request, StreamJsonRpc.Protocol.JsonRpcError response);
abstract member CreateExceptionFromRpcError : StreamJsonRpc.Protocol.JsonRpcRequest * StreamJsonRpc.Protocol.JsonRpcError -> StreamJsonRpc.RemoteRpcException
override this.CreateExceptionFromRpcError : StreamJsonRpc.Protocol.JsonRpcRequest * StreamJsonRpc.Protocol.JsonRpcError -> StreamJsonRpc.RemoteRpcException
Protected Overridable Function CreateExceptionFromRpcError (request As JsonRpcRequest, response As JsonRpcError) As RemoteRpcException

参数

request
JsonRpcRequest

生成此错误的 JSON-RPC 请求。

response
JsonRpcError

JSON-RPC 错误响应。

返回

RemoteRpcException 的一个实例。

适用于

另请参阅