io
C++ I/O scheduling library with asynchronous socket operations
|
This file defines macros for creating compile-time error messages. More...
Go to the source code of this file.
Macros | |
#define | IO_ERROR_HPP |
#define | IO_STRINGIFY(x) #x |
Converts a macro argument to a string literal. | |
#define | IO_TOSTRING(x) IO_STRINGIFY(x) |
Helper macro to convert the result of a macro expansion to a string. | |
#define | IO_ERROR_MESSAGE(msg) (__FILE__ ":" IO_TOSTRING(__LINE__) ": " msg) |
Constructs a formatted error message with the file and line number. | |
This file defines macros for creating compile-time error messages.
Definition in file error.hpp.
#define IO_ERROR_MESSAGE | ( | msg | ) | (__FILE__ ":" IO_TOSTRING(__LINE__) ": " msg) |
Constructs a formatted error message with the file and line number.
The resulting string literal is in the format "file:line: message"
.
msg | The custom error message string to append. |
Example
#define IO_STRINGIFY | ( | x | ) | #x |
#define IO_TOSTRING | ( | x | ) | IO_STRINGIFY(x) |