# error statement

The error statement displays the error
message from the messages file and continues
execution of the program.

## Syntax

```
error message.num,"parameter"{,"parameter"...}
```

## Description

The parameters are passed to
the error message handler and displayed according to the requirements
of the item in the messages file.

## Example(s)

```
read item from cust.file,"test" else
 error 202,"test"
end
```
The error statement in this example
displays:

```
[202] ’test’ is not on file.
```

## See also

- [abort statement](https://d3codex.com/pickbasic-flashbasic/abort-statement/)
- [messages file](https://d3codex.com/systemfiles/messages-file/)
- [open statement](https://d3codex.com/pickbasic-flashbasic/open-statement/)
- [print-err command](https://d3codex.com/tcl/print-err-command/)
- [print-error command](https://d3codex.com/tcl/print-error-command/)
- [Statements and functions](https://d3codex.com/pickbasic-flashbasic/statements-and-functions/)
- [stop statement](https://d3codex.com/pickbasic-flashbasic/stop-statement/)

---
Source: https://d3codex.com/pickbasic-flashbasic/error-statement/ - part of the D3Codex reference.
