# RaiseError, exclusion lists and domain exclusion

*Marketing Cloud Engagement Developer Study Guide · Programmatic Languages · Last updated November 3, 2026 · https://www.certifyforce.com/study-guide/marketing-cloud-engagement-developer/programmatic-languages/raiseerror-exclusion-lists-and-domain-exclusion*

What RaiseError() does to a subscriber, a job, a journey, data extension writes and billing, why it is error handling rather than exclusion, and how exclusion lists built from data views and Domain Exclusion data extensions on triggered sends keep people out instead.

- Certification: Salesforce Marketing Cloud Engagement Developer
- Exam section: Programmatic Languages
- Study guide: https://www.certifyforce.com/study-guide/marketing-cloud-engagement-developer

**Official exam objective:**

> Given a customer scenario, determine how to programmatically exclude a subscriber at email send time.

## What the exam expects

- Choose RaiseError() parameters that skip one subscriber or stop the whole job, and predict the effect in a journey.
- State how RaiseError() skips affect billing, tracking and data written before the error.
- Reject RaiseError() as a segmentation or suppression method, and pick exclusion lists, suppression lists or query-built exclusion data extensions instead.
- Configure a Domain Exclusion data extension on a triggered send and confirm what it excluded.
- Key terms: **RaiseError()** (an AMPscript function that stops processing for a subscriber or a job); **boolSkipCurrentOnly** (the parameter that limits the stop to the current subscriber); **exclusion list** (an audience whose members aren't sent the email); **Domain Exclusion data extension** (a data extension from the DomainExclusion template that blocks domains on a triggered send); **NotSent extract** (the tracking extract that lists unsent subscribers with a reason).

## Key facts

| Fact | Detail | Source |
|---|---|---|
| boolSkipCurrentOnly default | `false`: stops the entire email job | [RaiseError()](https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-utilities/mc-ampscript-reference-utilities-raise-error.html) |
| RaiseError() in journeys | Removes the subscriber from one send only | [RaiseError()](https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-utilities/mc-ampscript-reference-utilities-raise-error.html) |
| Billing | Skipped sends aren't counted as email usage | [RaiseError()](https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-utilities/mc-ampscript-reference-utilities-raise-error.html) |
| Tracking | Metrics include emails not sent because of RaiseError() | [RaiseError()](https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-utilities/mc-ampscript-reference-utilities-raise-error.html) |
| boolPreserveDataExt `true` | Keeps AMPscript data extension writes made before the error | [RaiseError()](https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-utilities/mc-ampscript-reference-utilities-raise-error.html) |
| RaiseError() purpose | Error handling, never exclusion or suppression | [Troubleshooting Email Sends](https://help.salesforce.com/s/articleView?id=000389518&language=en_US&type=1) |
| Resend exclusion | `_Sent` for the JobID into a sendable exclusion data extension | [Exclude Previous Recipients](https://help.salesforce.com/s/articleView?id=000335448&language=en_US&type=1) |
| Domain Exclusion data extension | DomainExclusion template; predefined Domain field | [Triggered Send Not Sent](https://help.salesforce.com/s/articleView?id=000389503&language=en_US&type=1) |
| Domain check | Uses the API call's EmailAddress | [Triggered Send Not Sent](https://help.salesforce.com/s/articleView?id=000389503&language=en_US&type=1) |
| Confirm an exclusion | NotSent extract, not the send log | [Triggered Send Not Sent](https://help.salesforce.com/s/articleView?id=000389503&language=en_US&type=1) |

## Check yourself

- When an exclusion or suppression list keeps subscribers out of a job, where does the excluded count appear?
- Which query does the resend article give for excluding only recipients who didn't bounce?
- When does an InsertDE() log row written before a RaiseError() skip survive?
- What field does a data extension created from the DomainExclusion template come with?

## Sources

- [RaiseError() (AMPscript)](https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-utilities/mc-ampscript-reference-utilities-raise-error.html)
- [Troubleshooting Marketing Cloud Engagement Email Sends](https://help.salesforce.com/s/articleView?id=000389518&language=en_US&type=1)
- [Triggered Send Email Not Sent to Subscriber](https://help.salesforce.com/s/articleView?id=000389503&language=en_US&type=1)
- [Create a Triggered Email Message Interaction](https://help.salesforce.com/s/articleView?id=000213279&language=en_US&type=1)
- [Exclude Subscribers Who Previously Received an Email](https://help.salesforce.com/s/articleView?id=000335448&language=en_US&type=1)
- [Exclusion Script for Journey Builder Email Activity](https://help.salesforce.com/s/articleView?id=000273326&language=en_US&type=1)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 8 linked practice questions, and unlimited timed mock exams are included with the Marketing Cloud Engagement Developer pack (USD $19): https://www.certifyforce.com/practice-exams
