comparison common/logging.h @ 513:5e2af38266f6

Add documentation for printlasterror
author Andre Heinecke <aheinecke@intevation.de>
date Mon, 28 Apr 2014 13:59:21 +0000
parents 3cf72c5282e8
children 2a4f7364ab81
comparison
equal deleted inserted replaced
512:d1812e171d0c 513:5e2af38266f6
91 } 91 }
92 #else 92 #else
93 # define ERRORPRINTF(fmt, ...) fprintf(stderr, DEBUGPREFIX "ERROR: " fmt, ##__VA_ARGS__); 93 # define ERRORPRINTF(fmt, ...) fprintf(stderr, DEBUGPREFIX "ERROR: " fmt, ##__VA_ARGS__);
94 #endif 94 #endif
95 95
96 /**
97 * @def PRINTLASTERROR(msg)
98 * @brief Prints the last windows error with a custom message
99 *
100 * Prints an error to stderr
101 */
96 #define PRINTLASTERROR(msg) \ 102 #define PRINTLASTERROR(msg) \
97 char *my_error = getLastErrorMsg(); \ 103 char *my_error = getLastErrorMsg(); \
98 if (my_error) { \ 104 if (my_error) { \
99 ERRORPRINTF(msg" : %s\n", my_error); \ 105 ERRORPRINTF(msg" : %s\n", my_error); \
100 free (my_error); \ 106 free (my_error); \

http://wald.intevation.org/projects/trustbridge/