Home > Language Reference > Statements
#Error Statement
Raises a user defined error.
Syntax
#Error Message
| Parameter | Description |
| Message | Any expression that can be converted into a string. |
Remarks
This statement causes the error #2099 to be raised during compilation and displays the text specified by the Message parameter in the Build tab of the Output Window. The Message parameter can be any expression including literal constants, conditional compilation constants and operators.
This statement is typically used to interupt compilation when a conditional compilation constant needed later on is not defined. For example:
#If Not DEBUG And Not NDEBUG Then #Error "You should define DEBUG or NDEBUG to compile this module!" #End If
Also refer to #Warning.
System requirements
| System | Minimal version | Remarks |
| Palm OS | Palm OS 3.0 | N/A |