WebClient client = ...int j = 1 / 0; // Instruction Aclient.send( handler -> {int i = 1 / 0; // Instruction B});I this specific case:
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/803b2e70-eba5-4e0a-b31b-28271256e1e4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
When Vert.x Web invokes your handler, it happens inside a try/catch so any exception thrown by the handler call will result in failing the routing context.When the web client handler is invoked, we're no longer inside this try/catch so the routing context cannot be automatically failed.
2017-07-24 18:02 GMT+02:00 Hidwulf <hid...@gmail.com>:
Hi,I'm working on a api project using vertx-web, basic Rest API.I'm missing something about the exception, whenever it occurs I can saw that vertx is triggering a http 500.But when an exception occurs, not expected (bad code or bad data for example), vertx just doesn't send anything to the client anymore, so in postman or something else the client is still waiting!Ex: in my default handler (trigger by my verticle) I do thisWebClient client = ...int j = 1 / 0; // Instruction Aclient.send( handler -> {int i = 1 / 0; // Instruction B});I this specific case:
- instruction A generate a nullpointer and it's fine my app will respond with an http 500
- instruction B (meaning I delete A of course), generate a nullpointer in the output but do nothing more and the client is still waiting.
Any clue? I don't really want to perform a try catch, I already transforme the thing into future plus compose but it doesn't appeal me.Thanks.
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/03ca2533-85bf-49dd-8829-82f38a9c60a3%40googlegroups.com.