---
title: Exception Classes Should Extend an Exception
description: "Impact Area Manageability Severity High Affected Element Apex Class ## Rule number **SF-EXCEPTION-NOT-EXTEND-EXCEPTION** ## Impact  If a class named Exception does not inherit from the base class Exception or one of its subclasses, standard exception handling functionalities are lost. ##…"
url: "https://community-staging.qualityclouds.com/qcdocs/qc/salesforce-rules/exception-classes-should-extend-an-exception/"
updated: "2025-03-21"
category: Rules
---

# Exception Classes Should Extend an Exception

Impact Area

Manageability

           Severity

High

           Affected Element

Apex Class

## Rule number

**SF-EXCEPTION-NOT-EXTEND-EXCEPTION**

## Impact 

If a class named Exception does not inherit from the base class Exception or one of its subclasses, standard exception handling functionalities are lost.

## Remediation

Ensure that if you create an exception class, it inherits from the base class Exception or one of its subclasses.

### Time to fix

15 min
