Synopsis: | A catch statement that catches an exception only to rethrow it should be avoided |
Language: | Java |
Severity Level: | 3 |
Category: | StrictException |
Description: |
Catch blocks that merely rethrow a caught exception only add to code size and runtime complexity.public class Foo { void bar() { try { // do something } catch (SomeException se) { throw se; } } } |