Hi,
Im not sure if I do this correct. I cannot get error handling to work in my app. All specific Exceptions are replaced by RuntimeExceptions, which in most cases don't provide useful details anymore like proper call stacks.
I think the reason is here: http://vertx.io/docs/yardoc/VertxWeb/RoutingContext.html#fail-instance_method
Every Exception passed to "fail" is converted into a Throwable via Vertx::Util::Utils.to_throwable.
This essentially creates a Proc which re-raises the exception and catches it again (utils.rb) (Helper.java) . IMO this would make sense if I pass a string to the "fail" method. But when I pass an exception it should not do this.
This makes proper exception handling nearly impossible.
Sorry, I'm unable to provide a Pull Request. I dont know where to start. :/ Is this ruby wrapper code somehow generated?
Im running a vertx 3.3.2 app on JRuby 9.1
Best
-Stephan
Hi,
Im not sure if I do this correct. I cannot get error handling to work in my app. All specific Exceptions are replaced by RuntimeExceptions, which in most cases don't provide useful details anymore like proper call stacks.
I think the reason is here: http://vertx.io/docs/yardoc/VertxWeb/RoutingContext.html#fail-instance_method
Every Exception passed to "fail" is converted into a Throwable via Vertx::Util::Utils.to_throwable.
This essentially creates a Proc which re-raises the exception and catches it again (utils.rb) (Helper.java) . IMO this would make sense if I pass a string to the "fail" method. But when I pass an exception it should not do this.
This makes proper exception handling nearly impossible.
Sorry, I'm unable to provide a Pull Request. I dont know where to start. :/ Is this ruby wrapper code somehow generated?
Im running a vertx 3.3.2 app on JRuby 9.1
Best
-Stephan