@BetaApi public class ApiExceptions extends Object
ApiException.| Constructor and Description |
|---|
ApiExceptions() |
| Modifier and Type | Method and Description |
|---|---|
static <ResponseT> |
callAndTranslateApiException(com.google.api.core.ApiFuture<ResponseT> future)
Invokes get on the given future, and if it throws an exception, then processes it in the
following way:
|
public static <ResponseT> ResponseT callAndTranslateApiException(com.google.api.core.ApiFuture<ResponseT> future)
1. If it is an UncheckedExecutionException, then:
a. If the exception cause is an ApiException, the ApiException is rethrown.
b. Otherwise, the UncheckedExecutionException is rethrown.
2. Otherwise, if it is any other RuntimeException, it propagates.