public static class ExceptionHandler.Builder extends Object
Modifier and Type | Method and Description |
---|---|
ExceptionHandler.Builder |
abortOn(Class<? extends Exception>... exceptions)
Adds the exceptions to abort on.
|
ExceptionHandler.Builder |
addInterceptors(ExceptionHandler.Interceptor... interceptors)
Adds the exception handler interceptors.
|
ExceptionHandler |
build()
Returns a new ExceptionHandler instance.
|
ExceptionHandler.Builder |
retryOn(Class<? extends Exception>... exceptions)
Add the exceptions to ignore/retry-on.
|
public ExceptionHandler.Builder addInterceptors(ExceptionHandler.Interceptor... interceptors)
interceptors
- the interceptors for this exception handler@SafeVarargs public final ExceptionHandler.Builder retryOn(Class<? extends Exception>... exceptions)
exceptions
- retry should continue when such exceptions are thrown@SafeVarargs public final ExceptionHandler.Builder abortOn(Class<? extends Exception>... exceptions)
exceptions
- retry should abort when such exceptions are thrownpublic ExceptionHandler build()
Copyright © 2019 Google LLC. All rights reserved.