dont throw a Bug when HTTP server dies

This commit is contained in:
Daniella / Tove 2022-07-29 18:12:07 +02:00
parent 44126aa477
commit bfcee3705d

View file

@ -5,7 +5,6 @@ import de.tudbut.tryumph.config.RequestCatcherConfig;
import de.tudbut.tryumph.config.TryConfig; import de.tudbut.tryumph.config.TryConfig;
import de.tudbut.tryumph.err.ProjectException; import de.tudbut.tryumph.err.ProjectException;
import de.tudbut.tryumph.server.http.Server; import de.tudbut.tryumph.server.http.Server;
import de.tudbut.tryumph.util.Bug;
import tudbut.global.DebugStateManager; import tudbut.global.DebugStateManager;
public class Launch { public class Launch {
@ -29,7 +28,7 @@ public class Launch {
IRequestCatcher requestCatcher = catcher.load().ok().await(); IRequestCatcher requestCatcher = catcher.load().ok().await();
server.listen(requestCatcher); server.listen(requestCatcher);
} catch(Throwable e) { } catch(Throwable e) {
throw new Bug("HTTP server died, but all errors from HTTP should usually be catched", e); throw new Error("HTTP Server died.", e);
} }
} }