[jboss-jira] [JBoss JIRA] Closed: (JBCACHE-979) Tighten up rethrowing of exceptions

Manik Surtani (JIRA) jira-events at lists.jboss.org
Wed Feb 28 13:25:08 EST 2007


     [ http://jira.jboss.com/jira/browse/JBCACHE-979?page=all ]

Manik Surtani closed JBCACHE-979.
---------------------------------

    Resolution: Done

> 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.BETA2, 2.0.0.GA, 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: 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