Class BigqueryJobFailureException

  • All Implemented Interfaces:
    java.io.Serializable

    public final class BigqueryJobFailureException
    extends java.lang.RuntimeException
    Generic exception to throw if a Bigquery job fails.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      BigqueryJobFailureException​(java.lang.String message, java.lang.Throwable cause, com.google.api.services.bigquery.model.JobStatus jobStatus, com.google.api.client.googleapis.json.GoogleJsonError jsonError)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static BigqueryJobFailureException create​(com.google.api.client.googleapis.json.GoogleJsonResponseException cause)
      Create an error for JSON server response errors.
      static BigqueryJobFailureException create​(com.google.api.services.bigquery.model.JobStatus jobStatus)
      Create an error from a failed job.
      static BigqueryJobFailureException create​(java.io.IOException cause)
      Delegate IOException errors, checking for GoogleJsonResponseException
      java.lang.String getMessage()  
      java.lang.String getReason()
      Returns a short error code describing why this job failed.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • BigqueryJobFailureException

        public BigqueryJobFailureException​(java.lang.String message,
                                           @Nullable
                                           java.lang.Throwable cause,
                                           @Nullable
                                           com.google.api.services.bigquery.model.JobStatus jobStatus,
                                           @Nullable
                                           com.google.api.client.googleapis.json.GoogleJsonError jsonError)
    • Method Detail

      • create

        public static BigqueryJobFailureException create​(java.io.IOException cause)
        Delegate IOException errors, checking for GoogleJsonResponseException
      • create

        public static BigqueryJobFailureException create​(com.google.api.client.googleapis.json.GoogleJsonResponseException cause)
        Create an error for JSON server response errors.
      • create

        public static BigqueryJobFailureException create​(com.google.api.services.bigquery.model.JobStatus jobStatus)
        Create an error from a failed job.
      • getReason

        public java.lang.String getReason()
        Returns a short error code describing why this job failed.

        Sample Reasons

        • "duplicate": The table you're trying to create already exists.
        • "invalidQuery": Query syntax error of some sort.
        • "unknown": Non-Bigquery errors.
        See Also:
        Troubleshooting Errors
      • getMessage

        public java.lang.String getMessage()
        Overrides:
        getMessage in class java.lang.Throwable