In multiple places throughout the Tomcat source code, java.lang.Throwable is caught, and dealt with as if it was an Exception subclass, meaning that java.lang.Error subclasses may be ignored or dealt with inappropriately. I'm making this as a bug to hold patches I've been working on, for this problem.
Created attachment 18706 [details] Patch for SSI filter and servlet
Created attachment 18707 [details] Patch for DefaultServlet Please note the two methods getBooleanInitParameter() and getIntInitParameter() - if someone with a better understanding of the Tomcat code layout could move these into a utility class or similar, it would probably be better.
I am sure you mean well, but this is a bad idea, sorry. The only acceptable change is for the parsing of the parameters, but it would need to be more conservative than this.
Perhaps Remy can elaborate on his reasoning for it being a bad idea so that James can amend his patches. Simply stating it is a bad idea without raising your own concerns does not mean anything.
I too am not a big fan of just catching Throwables and treating them as Exceptions. I'm not going to touch the getXParameter code at the moment, but will take a look at the catch(Throwable) parts.
OK, I've changed the classes (directly, not using your patches) to catch Exceptions instead of Throwables, log them better, and generally be a little better citizens in this regard. Thanks for reporting this.