---
title: Avoid throwing exception inside finally block
description: "**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…"
url: "https://community-staging.qualityclouds.com/qcdocs/qc/salesforce-rules/avoid-throwing-exception-inside-finally-block/"
updated: "2025-03-21"
category: Salesforce Rules
---

# 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
