Skip to content

Commit

Permalink
fix: add more exception info
Browse files Browse the repository at this point in the history
  • Loading branch information
hantmac committed Aug 30, 2024
1 parent f2c3dd3 commit 715a9b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,6 @@ public void uploadStream(String stageName, String destPrefix, InputStream inputS
}
} catch (RuntimeException e) {
System.out.println(e.getMessage());
// For datax batch insert test, do not throw exception
throw new SQLException(e);
} catch (IOException e) {
logger.warning("failed to upload input stream, file size is:" + fileSize / 1024.0 + e.getMessage());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static void dropStageIfExists(DatabendConnection connection, String stage
}

public static PresignContext getPresignContext(DatabendConnection connection, PresignMethod method, String stageName, String fileName)
throws SQLException {
throws SQLException {
requireNonNull(connection, "connection is null");
requireNonNull(method, "method is null");
Statement statement = connection.createStatement();
Expand All @@ -60,7 +60,7 @@ public static PresignContext getPresignContext(DatabendConnection connection, Pr
throw new SQLException("Failed to get presign url");
}
} catch (Throwable e) {
throw new SQLException("Failed to do presign");
throw new SQLException("Failed to do presign. Exception: " + e.toString(), e);
} finally {
statement.close();
}
Expand Down

0 comments on commit 715a9b5

Please sign in to comment.