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:
java.io.Serializable
public abstract class BaseGoogleAdsException extends com.google.api.gax.rpc.ApiExceptionBase 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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBaseGoogleAdsException.Factory<T extends BaseGoogleAdsException,U extends com.google.protobuf.Message>Optionally create a GoogleAdsException from a ApiException.
-
Constructor Summary
Constructors Constructor Description BaseGoogleAdsException(com.google.api.gax.rpc.ApiException original, T failure, io.grpc.Metadata metadata)Create from ApiException, GoogleAdsFailure (as Message) and metadata.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.protobuf.MessagegetGoogleAdsFailure()Return the decoded GoogleAdsFailure.java.lang.StringgetRequestId()Get the request id returned in the RPC trailers.-
Methods inherited from class com.google.api.gax.rpc.ApiException
getDomain, getErrorDetails, getMetadata, getReason, getStatusCode, isRetryable
-
-
-
-
Method Detail
-
getRequestId
public java.lang.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.
-
-