Back to CWE list
CWE-584
Return Inside Finally Block
Base
Draft
Description
The code has a return statement inside a finally block, which will cause any thrown exception in the try block to be discarded.
Parent Weaknesses (ChildOf)
Common Consequences
Scope
Other
Impact
Alter Execution Logic
Potential Mitigations
Implementation
Do not use a return statement inside the finally block. The finally block should have "cleanup" code.
Applicable Platforms
Not Language-Specific
Security Training
Train your team to recognize and prevent security threats with our comprehensive security awareness program.
Start TrainingVulnerability Scanning
Discover vulnerabilities in your applications and infrastructure before attackers do.
Scan Now