# <cferror>

Enables the display of customized HTML pages when errors occur.

This lets you maintain a consistent look and feel within your application, even when errors occur.

This tag **cannot** have a body.
This tag is also supported within [<cfscript>](script.md)

```
<cferror
    type=string
    Template=string
    mailTo=string
    exception=string
>
```

# Attributes

| Attribute | Type | Required | Description | Default |
|-----------|------|----------|-------------|---------|
| type | string | Yes | The type of error that the custom error page handles. - exception - request |  |
| Template | string | Yes | The relative path to the custom error page. |  |
| exception | string | No | Type of exception. Required if type = "exception" or "monitor". |  |

# Examples

```cfml
<cferror template ="path/to/errorTemplate.cfm" type ="exception" exception ="any" mailTo ="test01@mail.com">
```






