Summary: | java.lang.Throwable is caught inappropriately | ||
---|---|---|---|
Product: | Tomcat 5 | Reporter: | J Ross Nicoll <jrn2005> |
Component: | Unknown | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 5.5.17 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Attachments: |
Patch for SSI filter and servlet
Patch for DefaultServlet |
Description
J Ross Nicoll
2006-08-12 19:28:28 UTC
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. |