
org.webbitserver.netty.CatchingRunnable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of webbit Show documentation
Show all versions of webbit Show documentation
A Java event based WebSocket and HTTP server
package org.webbitserver.netty;
public abstract class CatchingRunnable implements Runnable {
private final Thread.UncaughtExceptionHandler exceptionHandler;
public CatchingRunnable(Thread.UncaughtExceptionHandler exceptionHandler) {
this.exceptionHandler = exceptionHandler;
}
@Override
public void run() {
try {
go();
} catch (Throwable t) {
exceptionHandler.uncaughtException(Thread.currentThread(), t);
}
}
protected abstract void go() throws Throwable;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy