FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

docs: update error handling comment to be more precise in samples by PhongChuong · Pull Request #3712 · googleapis/java-bigquery · GitHub

This repository was archived by the owner on Mar 23, 2026. It is now read-only.
/ java-bigquery Public archive
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .java  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,12 @@ public static void simpleApp(String projectId) {
// Check for errors
if (queryJob == null) {
throw new RuntimeException("Job no longer exists");
} else if (queryJob.getStatus().getError() != null) {
// You can also look at queryJob.getStatus().getExecutionErrors() for all
// errors, not just the latest one.
throw new RuntimeException(queryJob.getStatus().getError().toString());
} else if (queryJob.getStatus().getExecutionErrors() != null
&& queryJob.getStatus().getExecutionErrors().size() > 0) {
// TODO(developer): Handle errors here. An error here do not necessarily mean that the job
// has completed or was unsuccessful.
// For more details: https://cloud.google.com/bigquery/troubleshooting-errors
throw new RuntimeException("An unhandled error has occurred");
}
// [END bigquery_simple_app_query]

Expand Down

Back | FazBrowse Home | New Git URL