Home
FAQ
Player
Utilities
Stage
Gazebo
Contrib
Documentation
Publications
Contributors
Users

Project
Download
Bugs/Feedback
Mailing lists

Radish

Old news
Old stuff

Error.hh

Go to the documentation of this file.
00001 
00002 /***************************************************************************
00003  * Desc: Error handling macros
00004  * Author: Andrew Howard
00005  * Date: 13 May 2002
00006  * CVS: $Id: Error.hh,v 1.12 2005/03/19 21:10:30 natepak Exp $
00007  **************************************************************************/
00008 
00009 #ifndef ERROR_HH
00010 #define ERROR_HH
00011 
00012 #include <stdio.h>
00013 #include <errno.h>
00014 
00016 void ErrorInit(int msgLevel, const char *logFile=NULL);
00017 
00019 void ErrorFini();
00020 
00025 int ErrorPrint(int msgType, int level, const char *file, int line, const char *fmt, ...);
00026 
00031 int ErrorPrintGL(const char *file, int line);
00032 
00033 
00035 #define GZ_ERR_ERR 0
00036 #define GZ_ERR_WARN 1
00037 #define GZ_ERR_MSG 2
00038 #define GZ_ERR_DBG 2
00039            
00041 #define PRINT_ERR(msg)         ErrorPrint(GZ_ERR_ERR, 0, __FILE__, __LINE__, "error   : " msg "\n")
00042 #define PRINT_ERR1(msg, a)     ErrorPrint(GZ_ERR_ERR, 0, __FILE__, __LINE__, "error   : " msg "\n", a)
00043 #define PRINT_ERR2(msg, a, b)  ErrorPrint(GZ_ERR_ERR, 0, __FILE__, __LINE__, "error   : " msg "\n", a, b)
00044 #define PRINT_ERR3(msg, a, b, c)  ErrorPrint(GZ_ERR_ERR, 0, __FILE__, __LINE__,  "error   : " msg "\n", a, b, c)
00045 
00047 #define PRINT_WARN(msg)        ErrorPrint(GZ_ERR_WARN, 0, __FILE__, __LINE__, "warning : " msg "\n")
00048 #define PRINT_WARN1(msg, a)    ErrorPrint(GZ_ERR_WARN, 0, __FILE__, __LINE__, "warning : " msg "\n", a)
00049 #define PRINT_WARN2(msg, a, b) ErrorPrint(GZ_ERR_WARN, 0, __FILE__, __LINE__, "warning : " msg "\n", a, b)
00050 #define PRINT_WARN3(msg, a, b, c) ErrorPrint(GZ_ERR_WARN, 0, __FILE__, __LINE__, "warning : " msg "\n", a, b, c)
00051 
00059 #define PRINT_MSG0(level, msg) ErrorPrint(GZ_ERR_MSG, level, __FILE__, __LINE__, "" msg "\n") 
00060 #define PRINT_MSG1(level, msg, a) ErrorPrint(GZ_ERR_MSG, level, __FILE__, __LINE__, "" msg "\n", a) 
00061 #define PRINT_MSG2(level, msg, a, b)  ErrorPrint(GZ_ERR_MSG, level, __FILE__, __LINE__, "" msg "\n", a, b)
00062 #define PRINT_MSG3(level, msg, a, b, c) ErrorPrint(GZ_ERR_MSG, level, __FILE__, __LINE__, "" msg "\n", a, b, c)
00063 #define PRINT_MSG4(level, msg, a, b, c, d) ErrorPrint(GZ_ERR_MSG, level, __FILE__, __LINE__, "" msg "\n", a, b, c, d)
00064 #define PRINT_MSG5(level, msg, a, b, c, d, e) ErrorPrint(GZ_ERR_MSG, level, __FILE__, __LINE__, "" msg "\n", a, b, c, d, e)
00065 #define PRINT_MSG6(level, msg, a, b, c, d, e, f) ErrorPrint(GZ_ERR_MSG, level, __FILE__, __LINE__, "" msg "\n", a, b, c, d, e, f)
00066 #define PRINT_MSG7(level, msg, a, b, c, d, e, f, g) ErrorPrint(GZ_ERR_MSG, level, __FILE__, __LINE__, "" msg "\n", a, b, c, d, e, f, g)
00067 
00068 
00069 // Print GL error messages (check if error is set)
00070 #define PRINT_GL_ERR() ErrorPrintGL(__FILE__, __LINE__)
00071 
00072 #endif


Last updated $Date: 2004/12/21 01:49:15 $
Generated on Sun May 22 18:39:07 2005 for Gazebo by doxygen 1.4.2