Avoid throwing exception inside finally block

< 1 min read

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

Updated on March 21, 2025
Was it helpful ?