eclipse-vertx / vert.x

Vert.x is a tool-kit for building reactive applications on the JVM
http://vertx.io
Other
14.32k stars 2.08k forks source link

Exeptionhandler not working correctly #5230

Closed Freetoplay951 closed 5 months ago

Freetoplay951 commented 5 months ago
[02:52:02] Unhandled exception in router
[02:52:03] Unhandled exception in router
[02:52:03] Unhandled exception in router
[02:52:08] Unhandled exception in router

I use:

Vertx vertex = Vertx.vertx();
Router router = Router.router(vertex);

router.route().handler(SessionHandler.create(LocalSessionStore.create(vertex)));
router.routeWithRegex("/files/.*").handler(this::handleFileRequests);
router.route().handler(BodyHandler.create()).handler(this::handleRequests);
router.route().failureHandler(failureContext -> {
    failureContext.response().setStatusCode(404).end();
});

HttpServer innerServer = vertex
        .createHttpServer()
        .requestHandler(router)
        .exceptionHandler(error -> {
        })
        .listen(port, handler -> {
        });
tsegismont commented 5 months ago

Duplicates https://github.com/vert-x3/vertx-web/issues/2625