aboutsummaryrefslogtreecommitdiff
path: root/stub
diff options
context:
space:
mode:
authorCarl Mastrangelo <notcarl@google.com>2017-12-04 19:00:16 -0800
committerGitHub <noreply@github.com>2017-12-04 19:00:16 -0800
commitc9b02db276403db4794c6e5ffc78b46889cd4ce8 (patch)
treeaa152ee2e88b0598a42f4966359e427b1a93a3d5 /stub
parent2d88269965609e41d86410c57be099db5f72a207 (diff)
downloadgrpc-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.java5
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) {