語言

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的實例。

適用於

另請參閱