Jetty 7.4.5 org.eclipse.jetty.servlet.ServletHandler error handling

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Jetty 7.4.5 org.eclipse.jetty.servlet.ServletHandler error handling

NesaSimonDavid
Administrator
This is in regards to Jetty 7.4.5.. I'm working on a project (Nabble), and we had some error-handling issues.

Say that org.eclipse.jetty.servlet.ServletHandler:476 calls some Nabble code, which throws an exception like so: JtpServletException(TemplateRuntimeException(StringIndexOutOfBoundsException)).

JtpServletException is a subclass of javax.servlet.ServletException.
TemplateRuntimeException is a subclass of java.lang.RuntimeException.

Then, in ServletHandler, lines 511-517 unwrap the cause so what's left is TemplateRuntimeException(StringIndexOutOfBoundsException). Then this gets logged as a warning. Is this the correct behaviour? Because it's a RuntimeException, shouldn't it be logged as an error instead? What sort of exception must be thrown for Jetty to treat it as an error instead of a warning?