#555 New check: AvoidHidingCauseException

Future
closed
nobody
None
5
2015-09-24
2011-01-12
No

Problem: Hiding Cause exception in throwing new exception in catch block.
It is bad practice and something that was implemented in other code validation systems. It will be beneficial for Checkstyle to have it too.

We could detect it as: there is a "throw" but there not catch parameter in the same sentence.

Example:
try{
...
}
catch(Exception e) {
throw new RuntimeException("exception");
}

Discussion

  • Roman Ivanov

    Roman Ivanov - 2015-09-24

    issue tracer is moved to github, all sevntu Checks will be moved to main project eventually

     
  • Roman Ivanov

    Roman Ivanov - 2015-09-24
    • status: open --> closed
    • Group: --> Future
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks