Makes the Status-generated exceptions contain the status code.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=72950983
diff --git a/core/src/main/java/com/google/net/stubby/Status.java b/core/src/main/java/com/google/net/stubby/Status.java
index d491cf6..6b6de60 100644
--- a/core/src/main/java/com/google/net/stubby/Status.java
+++ b/core/src/main/java/com/google/net/stubby/Status.java
@@ -95,7 +95,7 @@
private final Status status;
public OperationException(Status status) {
- super(status.getDescription(), status.getCause());
+ super(status.getCode() + ": " + status.getDescription(), status.getCause());
this.status = status;
}
@@ -112,7 +112,7 @@
private final Status status;
public OperationRuntimeException(Status status) {
- super(status.getDescription(), status.getCause());
+ super(status.getCode() + ": " + status.getDescription(), status.getCause());
this.status = status;
}