![JAR search and dependency download from the Maven repository](/logo.png)
ratpack.rx2.internal.ErrorHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ratpack-rx2 Show documentation
Show all versions of ratpack-rx2 Show documentation
Ratpack kotlin dsl library
The newest version!
package ratpack.rx2.internal;
import io.reactivex.exceptions.OnErrorNotImplementedException;
import io.reactivex.exceptions.UndeliverableException;
import io.reactivex.functions.Consumer;
import ratpack.exec.Promise;
import ratpack.func.Action;
public class ErrorHandler implements Consumer {
@Override
public void accept(Throwable e) throws Exception {
if (e instanceof OnErrorNotImplementedException) {
Promise.error(e.getCause()).then(Action.noop());
} else if (e instanceof UndeliverableException) {
Promise.error(e.getCause()).then(Action.noop());
} else {
Promise.error(e).then(Action.noop());
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy