diff options
Diffstat (limited to 'src/csharp/Grpc.Core/RpcException.cs')
-rw-r--r-- | src/csharp/Grpc.Core/RpcException.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/csharp/Grpc.Core/RpcException.cs b/src/csharp/Grpc.Core/RpcException.cs index d2c912e73a..94429d74ce 100644 --- a/src/csharp/Grpc.Core/RpcException.cs +++ b/src/csharp/Grpc.Core/RpcException.cs @@ -73,6 +73,17 @@ namespace Grpc.Core } /// <summary> + /// Returns the status code of the call, as a convenient alternative to <see cref="StatusCode">Status.StatusCode</see>. + /// </summary> + public StatusCode StatusCode + { + get + { + return status.StatusCode; + } + } + + /// <summary> /// 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 <c>RpcException</c> thrown by the server-side part of the stack will have trailers always set to empty. |