Show: Delphi C++
Display Preferences


From RAD Studio
Jump to: navigation, search

Go Up to The Preprocessor Index


#error errmsg


The #error directive generates the message:

Error: filename line# : Error directive errmsg

This directive is usually embedded in a preprocessor conditional statement that catches some undesired compile-time condition. In the normal case, that condition will be false. If the condition is true, you want the compiler to print an error message and stop the compile. You do this by putting an #error directive within a conditional statement that is true for the undesired case.

Personal tools
In other languages