[
https://jira.jboss.org/jira/browse/GTNWCI-14?page=com.atlassian.jira.plug...
]
Matt Wringe commented on GTNWCI-14:
-----------------------------------
Normally you can't catch Errors. If an error is thrown it should just print the error
message and stacktrace.
Can you give an example of where an error gets swallowed with the Tomcat integration?
Improve web app event delivery
------------------------------
Key: GTNWCI-14
URL:
https://jira.jboss.org/jira/browse/GTNWCI-14
Project: GateIn Web Container Integration
Issue Type: Task
Reporter: Julien Viet
Fix For: 2.0.0-CR03
When an java.lang.Error arrises during the delivery of an event and it is swallowed (at
least in tomcat native integration).
In DefaultServletContainer the safeFireEvent method should be rewritten in the following
manner:
private void safeFireEvent(WebAppListener listener, WebAppEvent event)
{
try
{
listener.onEvent(event);
}
catch (Throwable t)
{
t.printStackTrace(); // yeah ugly change that
// If it's an error it's safer to propagate it to the parent (it could
be an OutOfMemoryException for instance)
if (t instanceof Error)
{
throw (Error)t;
}
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira