Developer Documentation Library > Scripting > Using preprocessor directives > #error
 
#error
Use the #error directive to generate an error message when the preprocessor runs.
Syntax
#error <text>
Parameter
<text>
A text value to include in the error message. The value does not need to be enclosed in quotation marks.
Example
The following example uses the #error directive to generate an error message if the identifier MyTextFile has not been previously defined in a #define directive:
#if ! defined (MyTextFile)
  #error You must include a #define directive for MyTextFile.
#endif
See also
Using preprocessor directives