# UTIL_Exceptions

**Class** · Group: `Utilities`

Learn it: [Utilities guide](/utilities-guide)

<div class="apex-member apex-class">

```apex
global inherited sharing class UTIL_Exceptions
```

Centralised container for framework-specific exception types. Groups related exception classes under a single outer class to minimise top-level file count while keeping each exception independently referenceable.

**Example**

```apex
if(config == null)
{
    throw new UTIL_Exceptions.ConfigurationException('Missing required configuration.');
}
```

</div>

---

## Inner Classes

| Class | Description |
|-------|-------------|
| [ConfigurationException](/reference/apex/util-exceptions-configurationexception) | Thrown when required platform configuration is absent or malformed. |
| [IllegalStateException](/reference/apex/util-exceptions-illegalstateexception) | Thrown when an operation is attempted on an object whose internal state does not support that operation. |
| [MaskingBlockedException](/reference/apex/util-exceptions-maskingblockedexception) | Thrown when a masking rule configured with FailureAction__c = BlockDml fails. |
| [NotFoundException](/reference/apex/util-exceptions-notfoundexception) | Thrown when a lookup for a specific record or resource yields no results. |
| [PermanentFailureException](/reference/apex/util-exceptions-permanentfailureexception) | Throw this from your own outbound handler code to say the failure is permanent: sending the same request again cannot help. |
| [RequestRefusedException](/reference/apex/util-exceptions-requestrefusedexception) | Throw this from parseResponse() when the external system answered with a success status but its body says it refused the request, for example an order answered 200 with status REJECTED. |
