Rajat Khandelwal created LENS-1039:
--------------------------------------

             Summary: Remove catch-all-to-wrap clauses from code
                 Key: LENS-1039
                 URL: https://issues.apache.org/jira/browse/LENS-1039
             Project: Apache Lens
          Issue Type: Wish
            Reporter: Rajat Khandelwal


There are multiple places where we have this snippet:

{noformat}
try{
  ...
} catch(Exception/Throwable e) {
  throw new LensException(e)
}
{noformat}

Two problems with this:

* If there's a run-time exception being thrown, it's unnecessarily wrapped
* If the caught exception is also a LensException, it's also unnecessarily 
being wrapped

Suggestion:

{noformat}
try{
  ...
} catch(CheckedException1 | CheckedException2 | ... e) {
  throw new LensException(e);
}

{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to