[jboss-jira] [JBoss JIRA] Created: (JBCACHE-979) Tighten up rethrowing of exceptions
Brian Stansberry (JIRA)
jira-events at lists.jboss.org
Thu Feb 15 21:14:30 EST 2007
Tighten up rethrowing of exceptions
-----------------------------------
Key: JBCACHE-979
URL: http://jira.jboss.com/jira/browse/JBCACHE-979
Project: JBoss Cache
Issue Type: Task
Security Level: Public (Everyone can see)
Reporter: Brian Stansberry
Priority: Minor
Look for this kind of stuff:
try
{
doIt();
}
catch (Exception e)
{
throw new RuntimeException(e);
}
and replace with:
try
{
doIt();
}
catch (RuntimeException e)
{
throw e;
}
catch (Exception e)
{
throw new RuntimeException(e);
}
I wrote a CacheListener that threw a custom runtime exception, expecting to be able to catch it. But the cache wrapped it, messing up my logic and forcing me to catch RuntimeException and check the cause. This particular one was in CacheImpl.invokeMethod() (and will be fixed in a sec).
A minor nit.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list