Skip to content

Commit 34e6806

Browse files
committed
Add throwable cause to DatastoreException
1 parent 67e5dfc commit 34e6806

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

gcloud-java-core/src/main/java/com/google/gcloud/BaseServiceException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public BaseServiceException(int code, String message, String reason, boolean ide
105105
}
106106

107107
public BaseServiceException(int code, String message, String reason, boolean idempotent,
108-
Exception cause) {
108+
Throwable cause) {
109109
super(message, cause);
110110
this.code = code;
111111
this.reason = reason;

gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/DatastoreException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public class DatastoreException extends BaseServiceException {
3939
new Error(503, "UNAVAILABLE"));
4040
private static final long serialVersionUID = 2663750991205874435L;
4141

42-
public DatastoreException(int code, String message, String reason, Exception cause) {
42+
public DatastoreException(int code, String message, String reason, Throwable cause) {
4343
super(code, message, reason, true, cause);
4444
}
4545

gcloud-java-datastore/src/main/java/com/google/gcloud/spi/DefaultDatastoreRpc.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ private static DatastoreException translate(
107107
return new DatastoreException((IOException) exception.getCause());
108108
}
109109
}
110-
return new DatastoreException(code, message, reason);
110+
return new DatastoreException(code, message, reason, exception);
111111
}
112112

113113
@Override

0 commit comments

Comments
 (0)