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 error,
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) |
protected static BaseServiceException.Error |
error(com.google.api.client.googleapis.json.GoogleJsonError error) |
int |
hashCode() |
boolean |
idempotent()
Returns
true when the operation that caused this exception had no side effects. |
protected boolean |
isRetryable(com.google.api.client.googleapis.json.GoogleJsonError error) |
protected boolean |
isRetryable(IOException exception) |
String |
location()
Returns the service location where the error causing the exception occurred.
|
protected static String |
message(IOException exception) |
String |
reason()
Returns the reason that caused the exception.
|
protected static String |
reason(com.google.api.client.googleapis.json.GoogleJsonError error) |
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 error,
boolean idempotent)
public BaseServiceException(int code,
String message,
String reason,
boolean idempotent)
protected Set<BaseServiceException.Error> retryableErrors()
protected boolean isRetryable(com.google.api.client.googleapis.json.GoogleJsonError error)
protected boolean isRetryable(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 set.protected String debugInfo()
protected static String reason(com.google.api.client.googleapis.json.GoogleJsonError error)
protected static BaseServiceException.Error error(com.google.api.client.googleapis.json.GoogleJsonError error)
protected static String message(IOException exception)
protected static void translateAndPropagateIfPossible(RetryHelper.RetryHelperException ex)
Copyright © 2016 Google. All rights reserved.