Avoid throwing exception inside finally block

Impact area

Manageability

Severity

High

Affected element

Apex Class

Rule ID #

SF-AVOID-THROW-FINALLY

Impact #

Throwing an exception in a finally block will override any other exception threw on previous try/catch block.

Remediation #

Remove throw statement in finally block and use a catch block to throw an exception.

Time to fix #

30 min

Was it helpful ?

THE AI CODE GOVERNANCE BRIEF

Sign up for new updates!