mirror of https://github.com/grpc/grpc-java.git
Makes the Status-generated exceptions contain the status code.
------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=72950983
This commit is contained in:
parent
1a87ab2909
commit
e1ae25c8c4
|
|
@ -95,7 +95,7 @@ public class Status {
|
||||||
private final Status status;
|
private final Status status;
|
||||||
|
|
||||||
public OperationException(Status status) {
|
public OperationException(Status status) {
|
||||||
super(status.getDescription(), status.getCause());
|
super(status.getCode() + ": " + status.getDescription(), status.getCause());
|
||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -112,7 +112,7 @@ public class Status {
|
||||||
private final Status status;
|
private final Status status;
|
||||||
|
|
||||||
public OperationRuntimeException(Status status) {
|
public OperationRuntimeException(Status status) {
|
||||||
super(status.getDescription(), status.getCause());
|
super(status.getCode() + ": " + status.getDescription(), status.getCause());
|
||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue