Uploaded image for project: 'JBoss Cache'
  1. JBoss Cache
  2. JBCACHE-979

Tighten up rethrowing of exceptions

    Details

      Description

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                manik Manik Surtani
                Reporter:
                brian.stansberry Brian Stansberry
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: