Printing a fatal message and terminating the application. More...
Macros | |
| #define | DoutFatal(cntrl, ...) |
| Macro for writing fatal debug output to the default debug object libcw_do . | |
Often an application needs to be terminated when a fatal error occurs (whether or not CWDEBUG is defined). Libcwd defines for these cases the macro DoutFatal.
This allows you to write
instead of the equivalent
The big difference with Dout is that DoutFatal is not replaced with white space when the macro CWDEBUG is not defined.
There are two debug channels that can be used together with DoutFatal: dc::fatal and dc::core. The first terminates by calling _Exit(180), the second terminates by std::abort(), causing the application to core dump.