diff options
author | Carl Mastrangelo <notcarl@google.com> | 2017-12-04 19:00:16 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-04 19:00:16 -0800 |
commit | c9b02db276403db4794c6e5ffc78b46889cd4ce8 (patch) | |
tree | aa152ee2e88b0598a42f4966359e427b1a93a3d5 /stub | |
parent | 2d88269965609e41d86410c57be099db5f72a207 (diff) | |
download | grpc-grpc-java-c9b02db276403db4794c6e5ffc78b46889cd4ce8.tar.gz |
all: add Status messages to all statuses
Diffstat (limited to 'stub')
-rw-r--r-- | stub/src/main/java/io/grpc/stub/ClientCalls.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/stub/src/main/java/io/grpc/stub/ClientCalls.java b/stub/src/main/java/io/grpc/stub/ClientCalls.java index 41e03a994..2ff16a33c 100644 --- a/stub/src/main/java/io/grpc/stub/ClientCalls.java +++ b/stub/src/main/java/io/grpc/stub/ClientCalls.java @@ -222,7 +222,8 @@ public final class ClientCalls { } cause = cause.getCause(); } - return Status.UNKNOWN.withCause(t).asRuntimeException(); + return Status.UNKNOWN.withDescription("unexpected exception").withCause(t) + .asRuntimeException(); } /** @@ -547,7 +548,7 @@ public final class ClientCalls { last = waitForNext(); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); - throw Status.CANCELLED.withCause(ie).asRuntimeException(); + throw Status.CANCELLED.withDescription("interrupted").withCause(ie).asRuntimeException(); } } if (last instanceof StatusRuntimeException) { |