diff options
author | Jan Tattermusch <jtattermusch@google.com> | 2017-05-19 17:33:21 +0200 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@google.com> | 2017-05-19 17:33:21 +0200 |
commit | 1de945b378917baebc96eb88f2b36877515faf7c (patch) | |
tree | eaf6b91f3103f734ce6796302dda3361b07199fb /src/csharp/Grpc.Core/Internal | |
parent | af3cc761adfd06b7620b77d70e87640b7a341ba1 (diff) |
dont concatenate strings when status is OK
Diffstat (limited to 'src/csharp/Grpc.Core/Internal')
-rw-r--r-- | src/csharp/Grpc.Core/Internal/CallError.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/csharp/Grpc.Core/Internal/CallError.cs b/src/csharp/Grpc.Core/Internal/CallError.cs index 541575f5e6..a46f9b3859 100644 --- a/src/csharp/Grpc.Core/Internal/CallError.cs +++ b/src/csharp/Grpc.Core/Internal/CallError.cs @@ -72,7 +72,10 @@ namespace Grpc.Core.Internal /// </summary> public static void CheckOk(this CallError callError) { - GrpcPreconditions.CheckState(callError == CallError.OK, "Call error: " + callError); + if (callError != CallError.OK) + { + throw new InvalidOperationException("Call error: " + callError); + } } } } |