root/vtcross/branches/bhilburn/src/include/vtcross/error.h @ 148

Revision 148, 353 bytes (checked in by bhilburn, 15 years ago)

ERROR and WARNING functions now support a variable number of arguments, and are
compatible with C-code.

Line 
1/* Virginia Tech Cognitive Radio Open Source Systems
2 * Virginia Tech, 2009
3 *
4 * LICENSE INFORMATION GOES HERE
5 */
6
7/* DESCRIPTION OF FILE.
8 */
9
10#ifndef ERROR_H
11#define ERROR_H
12
13#include <cstdio>
14
15#define ERROR(exit_code, ...) \
16    fprintf(stderr, __VA_ARGS__); \
17    exit(exit_code);
18
19#define WARNING(...) \
20    fprintf(stderr, __VA_ARGS__);
21
22#endif
Note: See TracBrowser for help on using the browser.