Skip to content

Commit

Permalink
Fix: Return entire stack trace for deadline exceeded error (#347)
Browse files Browse the repository at this point in the history
* Use original exception rather than message only

* Use original exception rather than message only
  • Loading branch information
zoercai committed Feb 8, 2021
1 parent 2ac1964 commit 2f94976
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -68,6 +68,10 @@ public static class JdbcSqlTimeoutException extends SQLTimeoutException
implements JdbcSqlException {
private static final long serialVersionUID = 2363793358642102814L;

private JdbcSqlTimeoutException(SpannerException e) {
super(e.getMessage(), "Timed out", Code.DEADLINE_EXCEEDED_VALUE, e);
}

private JdbcSqlTimeoutException(String message) {
super(message, "Timed out", Code.DEADLINE_EXCEEDED_VALUE);
}
Expand Down Expand Up @@ -188,7 +192,7 @@ static SQLException of(SpannerException e) {
return new JdbcAbortedException((AbortedException) e);
}
case DEADLINE_EXCEEDED:
return new JdbcSqlTimeoutException(e.getMessage());
return new JdbcSqlTimeoutException(e);
case ALREADY_EXISTS:
case CANCELLED:
case DATA_LOSS:
Expand Down

0 comments on commit 2f94976

Please sign in to comment.