Skip to content
Merged
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 @@ -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