# #error directive

Source: https://ref.dm-lang.org/DM/preprocessor/error

### Format
> `#error Text`

### Args
> Text: an error message to display

The #error directive halts compilation and displays the specified message.

```dm
#if DM_VERSION < 4
#error This compiler is too far out of date!
#endif
```

### See also
- [preprocessor](https://ref.dm-lang.org/DM/preprocessor/index.md)
- [#warn directive](https://ref.dm-lang.org/DM/preprocessor/warn.md)
