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:
zhangkun 2014-08-08 22:39:39 -07:00 committed by Eric Anderson
parent 1a87ab2909
commit e1ae25c8c4
1 changed files with 2 additions and 2 deletions

View File

@ -95,7 +95,7 @@ public class Status {
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 @@ public class Status {
private final Status status;
public OperationRuntimeException(Status status) {
super(status.getDescription(), status.getCause());
super(status.getCode() + ": " + status.getDescription(), status.getCause());
this.status = status;
}