Planeshift

pserror.h

Go to the documentation of this file.
00001 /* We have to find a better solution later (ie exceptions?)
00002  * just implement errorhalt (which should stop the program)
00003  * and errormsg (which should just print an error msg and continue
00004  */
00005 
00006 #ifndef __ERROR_H__
00007 #define __ERROR_H__
00008 
00013 void psprintf(const char *arg, ...);
00014 
00015 void errorhalt(const char* function, const char* file, int line,
00016     const char *msg);
00017 void errormsg(const char* function, const char* file, int line,
00018     const char *msg);
00019 
00020 #define ERRORHALT(msg)    errorhalt (__PRETTY_FUNCTION__,__FILE__, __LINE__, msg)
00021 #define ERRORMSG(msg)    errormsg (__PRETTY_FUNCTION__,__FILE__, __LINE__, msg)
00022 
00025 #endif