]
Manik Surtani updated JBCACHE-979:
----------------------------------
Fix Version/s: 2.0.0.BETA2
2.0.0.GA
1.4.1.SP3
Assignee: Manik Surtani
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
Assigned To: Manik Surtani
Priority: Minor
Fix For: 2.0.0.GA, 2.0.0.BETA2, 1.4.1.SP3
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: