Show / Hide Table of Contents

    Class RpcException

    Thrown when remote procedure call fails. Every RpcException is associated with a resulting Status of the call.

    Inheritance
    System.Object
    System.Exception
    RpcException
    Implements
    System.Runtime.InteropServices._Exception
    System.Runtime.Serialization.ISerializable
    Inherited Members
    System.Exception.GetBaseException()
    System.Exception.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)
    System.Exception.GetType()
    System.Exception.ToString()
    System.Exception.Data
    System.Exception.HelpLink
    System.Exception.HResult
    System.Exception.InnerException
    System.Exception.Message
    System.Exception.Source
    System.Exception.StackTrace
    System.Exception.TargetSite
    System.Exception.SerializeObjectState
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Grpc.Core
    Assembly: Grpc.Core.Api.dll
    Syntax
    public class RpcException : Exception, _Exception, ISerializable

    Constructors

    RpcException(Status)

    Creates a new RpcException associated with given status.

    Declaration
    public RpcException(Status status)
    Parameters
    Type Name Description
    Status status

    Resulting status of a call.

    RpcException(Status, Metadata)

    Creates a new RpcException associated with given status and trailing response metadata.

    Declaration
    public RpcException(Status status, Metadata trailers)
    Parameters
    Type Name Description
    Status status

    Resulting status of a call.

    Metadata trailers

    Response trailing metadata.

    RpcException(Status, Metadata, String)

    Creates a new RpcException associated with given status, message and trailing response metadata. NOTE: the exception message is not sent to the remote peer. Use status.Details to pass error details to the peer.

    Declaration
    public RpcException(Status status, Metadata trailers, string message)
    Parameters
    Type Name Description
    Status status

    Resulting status of a call.

    Metadata trailers

    Response trailing metadata.

    System.String message

    The exception message.

    RpcException(Status, String)

    Creates a new RpcException associated with given status and message. NOTE: the exception message is not sent to the remote peer. Use status.Details to pass error details to the peer.

    Declaration
    public RpcException(Status status, string message)
    Parameters
    Type Name Description
    Status status

    Resulting status of a call.

    System.String message

    The exception message.

    Properties

    Status

    Resulting status of the call.

    Declaration
    public Status Status { get; }
    Property Value
    Type Description
    Status

    StatusCode

    Returns the status code of the call, as a convenient alternative to StatusCode.

    Declaration
    public StatusCode StatusCode { get; }
    Property Value
    Type Description
    StatusCode

    Trailers

    Gets the call trailing metadata. Trailers only have meaningful content for client-side calls (in which case they represent the trailing metadata sent by the server when closing the call). Instances of RpcException thrown by the server-side part of the stack will have trailers always set to empty.

    Declaration
    public Metadata Trailers { get; }
    Property Value
    Type Description
    Metadata

    Implements

    System.Runtime.InteropServices._Exception
    System.Runtime.Serialization.ISerializable
    Back to top Generated by DocFX