public Future < T > recover ( final Function < ? super Throwable , ? extends T > fn ) { return Future . of ( toCompletableFuture ( ) . exceptionally ( ( Function ) fn ) ) ; }
Returns a new Future that when this Future completes exceptionally is executed with this Future exception as the argument to the supplied function . Otherwise if this Future completes normally applyHKT the returned Future also completes normally with the same value .