00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef _ERROR_H_
00012 #define _ERROR_H_
00013
00014
00015 #include <strstream>
00016
00017 extern void WARNING(const char *);
00018 extern void FATAL(const char *);
00019
00020 #define FATAL_MACRO(output)\
00021 do{std::ostrstream message; \
00022 message <<__FILE__<<":"<<__LINE__<<": "<<output<<'\0';\
00023 ::FATAL(message.str()); }while(0)
00024
00025 #define WARNING_MACRO(output)\
00026 do{std::ostrstream message; \
00027 message <<__FILE__<<":"<<__LINE__<<": "<<output<<'\0';\
00028 ::WARNING(message.str()); message.freeze(false); }while(0)
00029
00030
00031 #endif // _ERROR_H_
00032