Change method signatures to Throwable (from Exception)
This allows use of spring-retry with naughty libraries that use Error conditions to signal retryable exceptions. Users can still declare their RetryCallback as "throws Exception" if they want to be conservative. Also added throwLastExceptionOnExhausted to RetryTemplate to throw the last exception instead of the ExhaustedRetryException.
This commit is contained in:
@@ -33,5 +33,5 @@ public interface RetryCallback<T> {
|
||||
* @return the result of the successful operation.
|
||||
* @throws Exception if processing fails
|
||||
*/
|
||||
T doWithRetry(RetryContext context) throws Exception;
|
||||
T doWithRetry(RetryContext context) throws Throwable;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user