Class BaseGoogleAdsException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.google.api.gax.rpc.ApiException
com.google.ads.googleads.lib.stubs.exceptions.BaseGoogleAdsException
All Implemented Interfaces:
Serializable

public abstract class BaseGoogleAdsException extends com.google.api.gax.rpc.ApiException
Base class for GoogleAdsException. Provides a generic holder for GoogleAdsFailures which can be replaced with statically typed subclasses for a specific version of GoogleAdsFailure.
See Also:
  • Constructor Details

    • BaseGoogleAdsException

      public BaseGoogleAdsException(com.google.api.gax.rpc.ApiException original, T failure, io.grpc.Metadata metadata)
      Create from ApiException, GoogleAdsFailure (as Message) and metadata.
  • Method Details

    • getRequestId

      public String getRequestId()
      Get the request id returned in the RPC trailers. Returns null if the RPC has not completed or no request id was received.
    • getGoogleAdsFailure

      public com.google.protobuf.Message getGoogleAdsFailure()
      Return the decoded GoogleAdsFailure. Subclasses can override this method to return version specific types.