Optimize uses of onErrorResume()
This commit replaces uses of onErrorResume() with - onErrorMap() in places where onErrorResume() is just used to map to a different exception. - onErrorComplete() where onErrorResume() just maps to Mono.empty(). - onErrorReturn() where onErrorResum() just maps to Mono.just(). Closes gh-31352
This commit is contained in:
@@ -228,8 +228,8 @@ public class R2dbcTransactionManager extends AbstractReactiveTransactionManager
|
||||
.then(Mono.error(ex));
|
||||
}
|
||||
return Mono.error(ex);
|
||||
})).onErrorResume(ex -> Mono.error(new CannotCreateTransactionException(
|
||||
"Could not open R2DBC Connection for transaction", ex)));
|
||||
})).onErrorMap(ex -> new CannotCreateTransactionException(
|
||||
"Could not open R2DBC Connection for transaction", ex));
|
||||
}).then();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user