The Delphi MESSAGE directive is a very powerful one, you can generate compiler hints, warnings and errors with it, even fatal ones that abort compilation.
The compiler will return error codes H1054 (hint), W1054 (warning), E1054 (error) or F1054 (fatal error), which in the documentation are known under the catch-all x1054.
You need to take a bit of care with message directives, especially with the quotes. For instance
{$Message Error 'Not implemented'}
gives you the error below, but continues compiling:
[DCC Error] E1054 Not implemented
However, if you forget the single quotes
{$Message Error Not implemented}
it gives you error E1030 (not x1054), which is a bit confusing as it is a catch-all for invalid directives:
[DCC Error] E1030 Invalid compiler directive: 'message'
Here is a full example (now moved to bitbucket) of all the message directives and compiler reactions you can get: Read the rest of this entry »