public class BaseServiceException extends RuntimeException
Modifier and Type | Class and Description |
---|---|
static class |
BaseServiceException.Error |
static class |
BaseServiceException.ExceptionData |
Modifier and Type | Field and Description |
---|---|
static int |
UNKNOWN_CODE |
Modifier | Constructor and Description |
---|---|
protected |
BaseServiceException(BaseServiceException.ExceptionData exceptionData) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
getCode()
Returns the code associated with this exception.
|
String |
getDebugInfo() |
String |
getLocation()
Returns the service location where the error causing the exception occurred.
|
String |
getReason()
Returns the reason that caused the exception.
|
int |
hashCode() |
boolean |
isRetryable()
Returns
true when it is safe to retry the operation that caused this exception. |
static boolean |
isRetryable(boolean idempotent,
IOException exception) |
static boolean |
isRetryable(Integer code,
String reason,
boolean idempotent,
Set<BaseServiceException.Error> retryableErrors) |
static void |
translate(ExecutionException ex) |
static void |
translate(RetryHelper.RetryHelperException ex) |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public static final int UNKNOWN_CODE
@InternalApi(value="This class should only be extended within google-cloud-java") protected BaseServiceException(BaseServiceException.ExceptionData exceptionData)
@InternalApi public static boolean isRetryable(Integer code, String reason, boolean idempotent, Set<BaseServiceException.Error> retryableErrors)
@InternalApi public static boolean isRetryable(boolean idempotent, IOException exception)
@InternalApi public static void translate(RetryHelper.RetryHelperException ex)
@InternalApi public static void translate(ExecutionException ex)
public int getCode()
public String getReason()
public boolean isRetryable()
true
when it is safe to retry the operation that caused this exception.public String getLocation()
null
if not available.@InternalApi public String getDebugInfo()
Copyright © 2019 Google LLC. All rights reserved.