Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add more exception info #263

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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