in component-dsl/src/main/java/org/apache/aries/component/dsl/internal/BaseOSGiImpl.java [346:359]
public OSGi<T> recoverWith(BiFunction<T, Exception, OSGi<T>> onError) {
return new BaseOSGiImpl<>((executionContext, op) ->
run(
executionContext,
t -> {
try {
return op.apply(t);
}
catch (Exception e) {
return onError.apply(t, e).run(executionContext, op);
}
}
));
}