|
Status: Draft Weakness ID: 584 (Weakness Base)Description Summary The code has a return statement inside a finally block, which will cause any thrown exception in the try block to be discarded. Potential Mitigations Do not use a return statement inside the finally block. The finally block should have "cleanup" code. Demonstrative Examples In the following code excerpt, the IllegalArgumentException will never be delivered to the caller. The finally block will cause the exception to be discarded. try { ... throw IllegalArgumentException(); } finally { return r; }
Relationships
Time of Introduction ImplementationContent History Modifications Eric Dalci. Cigital. 2008-07-01. (External) updated Potential_Mitigations, Time_of_Introduction CWE Content Team. MITRE. 2008-09-08. (Internal) updated Relationships |
|
|
|||