public class BaseServiceException extends RuntimeException
| Modifier and Type | Class and Description |
|---|---|
protected static class |
BaseServiceException.Error |
| Modifier and Type | Field and Description |
|---|---|
static int |
UNKNOWN_CODE |
| Constructor and Description |
|---|
BaseServiceException(com.google.api.client.googleapis.json.GoogleJsonError googleJsonError,
boolean idempotent) |
BaseServiceException(int code,
String message,
String reason,
boolean idempotent) |
BaseServiceException(int code,
String message,
String reason,
boolean idempotent,
Throwable cause) |
BaseServiceException(IOException exception,
boolean idempotent) |
| Modifier and Type | Method and Description |
|---|---|
int |
code()
Returns the code associated with this exception.
|
protected String |
debugInfo() |
boolean |
equals(Object obj) |
int |
hashCode() |
boolean |
idempotent()
Returns
true when the operation that caused this exception had no side effects. |
protected boolean |
isRetryable(boolean idempotent,
BaseServiceException.Error error) |
protected boolean |
isRetryable(boolean idempotent,
IOException exception) |
String |
location()
Returns the service location where the error causing the exception occurred.
|
String |
reason()
Returns the reason that caused the exception.
|
boolean |
retryable()
Returns
true when it is safe to retry the operation that caused this exception. |
protected Set<BaseServiceException.Error> |
retryableErrors() |
protected static void |
translateAndPropagateIfPossible(RetryHelper.RetryHelperException ex) |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic static final int UNKNOWN_CODE
public BaseServiceException(IOException exception, boolean idempotent)
public BaseServiceException(com.google.api.client.googleapis.json.GoogleJsonError googleJsonError,
boolean idempotent)
public BaseServiceException(int code,
String message,
String reason,
boolean idempotent)
protected Set<BaseServiceException.Error> retryableErrors()
protected boolean isRetryable(boolean idempotent,
BaseServiceException.Error error)
protected boolean isRetryable(boolean idempotent,
IOException exception)
public int code()
public String reason()
public boolean retryable()
true when it is safe to retry the operation that caused this exception.public boolean idempotent()
true when the operation that caused this exception had no side effects.public String location()
null if not available.protected String debugInfo()
protected static void translateAndPropagateIfPossible(RetryHelper.RetryHelperException ex)
Copyright © 2016 Google. All rights reserved.