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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBaseGoogleAdsException.Factory<T extends BaseGoogleAdsException,U extends com.google.protobuf.Message> Optionally create a GoogleAdsException from a ApiException. -
Constructor Summary
ConstructorsConstructorDescriptionBaseGoogleAdsException(com.google.api.gax.rpc.ApiException original, T failure, io.grpc.Metadata metadata) Create from ApiException, GoogleAdsFailure (as Message) and metadata. -
Method Summary
Modifier and TypeMethodDescriptioncom.google.protobuf.MessageReturn the decoded GoogleAdsFailure.Get the request id returned in the RPC trailers.Methods inherited from class com.google.api.gax.rpc.ApiException
getDomain, getErrorDetails, getMetadata, getReason, getStatusCode, isRetryableMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
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
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.
-