You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lens.apache.org by "Rajat Khandelwal (JIRA)" <ji...@apache.org> on 2016/05/10 08:08:12 UTC
[jira] [Created] (LENS-1039) Remove catch-all-to-wrap clauses from
code
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)