Skip to content

fix(bqjdbc): Log exception messages - part 3#12920

Open
Neenu1995 wants to merge 7 commits intomainfrom
fix-sever-logs2
Open

fix(bqjdbc): Log exception messages - part 3#12920
Neenu1995 wants to merge 7 commits intomainfrom
fix-sever-logs2

Conversation

@Neenu1995
Copy link
Copy Markdown
Contributor

@Neenu1995 Neenu1995 commented Apr 24, 2026

b/505826451

  • Enhanced Error Logging: Updated catch blocks and direct exception throws across all files to ensure that when a severe error occurs, the specific exception and its message are logged.
  • Logged Thrown Exceptions: In catch blocks where a new exception type is thrown (wrapping the original cause), we now log the new exception to make it clear what the application will see.
  • Used Exception Messages: Updated the logs to use the message from the exception instance rather than hardcoded strings, ensuring more accurate context in the logs.
  • Added Loggers: Added loggers to utility classes that previously couldn't log errors.

@Neenu1995 Neenu1995 requested review from a team as code owners April 24, 2026 15:54
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request standardizes exception handling and logging across the BigQuery JDBC driver by ensuring that exceptions are logged at the severe level before being thrown. It introduces loggers to several utility classes and refactors catch blocks to provide more descriptive error messages. Review feedback suggests restoring lost context, specifically the 'catalogParam' variable, in BigQueryDatabaseMetaData and recommends using a static final logger in PooledConnectionDataSource to align with standard practices.

Neenu1995 and others added 6 commits April 24, 2026 12:16
…gle/cloud/bigquery/jdbc/BigQueryDatabaseMetaData.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…gle/cloud/bigquery/jdbc/BigQueryDatabaseMetaData.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…gle/cloud/bigquery/jdbc/PooledConnectionDataSource.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
throw new BigQueryJdbcException(ex);
BigQueryJdbcException e =
new BigQueryJdbcException("IOException during ArrowDeserializer creation", ex);
LOG.severe(e, e.getMessage());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

When we get Mdc working, can this LOG be a part of the exception? At least for exceptions that we own they could log sever errors, so we'll never forget to log it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants