BaseDraft

CWE-584Return Inside Finally Block

Category: other

Description

The code has a return statement inside a finally block, which will cause any thrown exception in the try block to be discarded.

Common consequences· 1

  • Other — Alter Execution Logic

Potential mitigations· 1

  • [Implementation]Do not use a return statement inside the finally block. The finally block should have "cleanup" code.

References

  1. https://cwe.mitre.org/data/definitions/584.html

Related by meaning· 6

Nearest entities by semantic similarity across the cs-graph corpus.

CWE
Empty Exception Block
CWE
Uncaught Exception
CWE
Insufficient Control Flow Management
CWE
Unchecked Error Condition
CWE
Explicit Call to Finalize()
CWE
Excessively Deep Nesting
Sourced from MITRE CWE 4.20. Curated for EU compliance use cases by Adam Lundqvist, Founder at SQUR.