NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

2.3.3 Pre-processing control lines

The #error and #warning features enable code to report warning and error conditions to the compiler for integration with standard compile-time warnings and errors.

pp-control-line:
#error pp-message
#warning pp-message
pp-message:
pp-tokensopt

The example

#warning Code review needed before check-in
#define DEBUG
#if DEBUG && RETAIL
   #error A build can't be both debug and retail!
#endif
class Class1
{…}

always produces a warning ("Code review needed before check-in"), and produces an error if the pre-processing identifiers DEBUG and RETAIL are both defined.