> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alumio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Throw error

> Interrupt processing when a condition is met.

export const FormField = ({property, label, required = false, diType, uiPatterns, children}) => {
  const patterns = Array.isArray(uiPatterns) ? uiPatterns : uiPatterns ? [uiPatterns] : [];
  return <div style={{
    margin: '1.5rem 0'
  }}>
      <div style={{
    display: 'flex',
    alignItems: 'baseline',
    flexWrap: 'wrap',
    gap: '0.5rem',
    marginBottom: '0.25rem'
  }}>
        <strong>{label}</strong>
        <span style={{
    fontSize: '0.7rem',
    fontWeight: 600,
    textTransform: 'uppercase',
    letterSpacing: '0.04em',
    color: required ? '#6241f5' : '#6b7280'
  }}>
          {required ? 'Required' : 'Optional'}
        </span>
      </div>

      <div>{children}</div>

      {diType || patterns.length > 0 ? <p style={{
    fontSize: '0.85rem',
    color: '#6b7280',
    marginBottom: 0
  }}>
          {diType ? <>
              See the <a href={`/references/${diType}`}>{diType}</a> reference.{' '}
            </> : null}
          {patterns.length > 0 ? <>
              Accepts a <a href={`/documentation/placeholders-and-patterns/patterns#${patterns[0]}`}>pattern</a>.
            </> : null}
        </p> : null}
    </div>;
};

Interrupt processing when a condition is met. Reaching this step stops the current run by raising an error with a message you choose; it does not change the entity. It is most useful inside [Apply transformer conditionally](/references/transformer/conditional), so you can deliberately fail a run when the data is invalid, for example when a required field is missing or a value is not allowed. The message you write is recorded so you can see why the run was stopped.

This documentation describes: [Schema](/schemas/transformer/exception)

## Fields

<FormField property="message" label="Exception message" required>
  The message recorded when the run is interrupted. You can mix in live entity data with placeholders such as `&{order.id}`, so the error explains exactly what went wrong. The message is limited to 10,000 characters. See [Placeholders](/references/placeholders) for the full syntax.
</FormField>

## Sample data

This feature does not change the entity; reaching it stops the run. With the configuration below, any entity that reaches this step halts processing and records a message such as `Order 1001 has no customer email`, so no further steps run for that entity.

| Field             | Value                                     |
| ----------------- | ----------------------------------------- |
| Exception message | `Order &{order.id} has no customer email` |

```json Configuration theme={null}
{
  "prototype": "exception",
  "parameters": {
    "message": "Order &{order.id} has no customer email"
  }
}
```
