Skip to content
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 @@ -284,7 +284,7 @@ final boolean internalExecute(String sql)
throw new SQLException(e.getMessage(), e);
}
catch (RuntimeException e) {
throw new SQLException("Error executing query", e);
throw new SQLException("Error executing query: " + e.getMessage(), e);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e.getMessage() may be null
in such case, it will look funny.

Suggested change
throw new SQLException("Error executing query: " + e.getMessage(), e);
throw new SQLException("Error executing query: " + firstNonNull(e.getMessage(), e), e);

}
finally {
executingClient.set(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ private QueryResult executeQuery(String url, String username, String password, Q
}
catch (SQLException e) {
Exception exception = e;
if (("Error executing query".equals(e.getMessage()) || "Error fetching results".equals(e.getMessage())) &&
if ((e.getMessage().startsWith("Error executing query") || "Error fetching results".equals(e.getMessage())) &&
(e.getCause() instanceof Exception)) {
exception = (Exception) e.getCause();
}
Expand Down