Chris Heald shows in his article ‘JRuby Performance: Exceptions are not flow control’ how the anti-pattern of using ‘exceptions as flow control’ has an serious effect on the performance.
Thanks to headius logging the exceptions is as easy as:
jruby -Xlog.exceptions=true -Xlog.backtraces=true -Xlog.callers=true -S trinidad 2>&1 | grep "Backtrace generated" -A4
BTW: trinidad is used to run rails and rackup applications in an embedded Apache Tomcat