vert.x
vert.x copied to clipboard
Inbound buffer silently ignores an exception
Hey,
I have been playing with a simple TCP server, and it seems like exceptions thrown in socket::handler are silently ignored. None of the below exception handlers are passed to InboundBuffer as a result an exception neither being caught or logged:
public class SimpleServer {
public static void main(String[] args) {
System.err.println("Application starting...");
final Vertx vertx = Vertx.vertx();
final FileSystem fs = vertx.fileSystem();
final NetServer server = vertx.createNetServer();
server.exceptionHandler(System.err::println);
server.connectHandler(socket -> {
socket.exceptionHandler(System.err::println);
socket.handler($ -> fs.readDirBlocking("/WHERE_IS_MY_EXCEPTION").forEach(System.out::println));
}).listen(3456);
}
}
I'm having errors with parsing the input stream and it not reporting errors.
Seems like NetSocketImpl should have an exception handler for InboundBuffer. I have a set a breakpoint in InboundBuffer in handleEvent shows
io.vertx.ext.stomp.impl.FrameException: Incorrect header value - the header uses an illegal escaped character '7' (55)
and it is silently ignored.