Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Error Checking Macros


Detailed Description

These macros are used to check return values, print the associated errors and perform some recovery action if necessary.


Defines

#define phDO_CHECK(rc, pmsg, fmt, action,)
#define phCHECK_RC(rc, pmsg, fmt,)   phDO_CHECK(rc,pmsg,fmt, goto error, ## __VA_ARGS__ )
#define phBREAK_RC(rc, pmsg, fmt,)   phDO_CHECK(rc,pmsg,fmt, break, ## __VA_ARGS__ )
#define phCONT_RC(rc, pmsg, fmt,)   phDO_CHECK(rc,pmsg,fmt, continue, ## __VA_ARGS__ )
#define phPRINT_RC(rc, pmsg, fmt,)   phDO_CHECK(rc,pmsg,fmt, , ## __VA_ARGS__ )
#define phDO_CHECKPTR(ptr, pmsg, fmt, action,)
#define phCHECK_PTR(ptr, pmsg, fmt,)   phDO_CHECKPTR(ptr,pmsg,fmt, goto error, ## __VA_ARGS__ )
#define phBREAK_PTR(ptr, pmsg, fmt,)   phDO_CHECKPTR(ptr,pmsg,fmt, break, ## __VA_ARGS__ )
#define phCONT_PTR(ptr, pmsg, fmt,)   phDO_CHECKPTR(ptr,pmsg,fmt, continue, ## __VA_ARGS__ )
#define phPRINT_PTR(ptr, pmsg, fmt,)   phDO_CHECKPTR(ptr,pmsg,fmt, , ## __VA_ARGS__ )
#define phCHECK_NULLPTR   phCHECK_PTR
#define phBREAK_NULLPTR   phBREAK_PTR
#define phCONT_NULLPTR   phCONT_PTR
#define phPRINT_NULLPTR   phPRINT_PTR
#define phTHISCHK()   { phCHECK_NULLPTR(this,NULL,"this == NULL"); }




Copyright (C) 2002 - 2007 Philip D.S. Thoren ( pthoren@users.sourceforge.net )
University Of Massachusetts at Lowell
Robotics Lab
SourceForge.net Logo


Generated on Sat Jun 16 02:45:27 2007 for phission by  doxygen 1.4.4