home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
thread2.zip
/
PMASSERT.H
< prev
next >
Wrap
Text File
|
1993-03-10
|
636b
|
21 lines
//-------------------------------------------------------------------
// pmassert.h
#ifndef NDEBUG
#define pmassert(hab,exp)\
{\
if(!(exp)) {\
char ebuff[ 64 ]; unsigned long errorid; unsigned short shortrc;\
errorid = WinGetLastError( hab ); \
sprintf( ebuff, "Line %d\nFile %s\nLast Error %p\nExpression %s\n",\
__LINE__, __FILE__, errorid, #exp );\
shortrc = WinMessageBox( HWND_DESKTOP, HWND_DESKTOP, ebuff,\
"Assertion failed. Continue?", 0, MB_YESNO );\
if( shortrc == MBID_NO ) exit( 1 );\
}\
}
#else
#define pmassert(hab,exp)
#endif
// end of file pmassert.h