home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / RCUTILS.ZIP / ERRDIAG.H < prev    next >
Text File  |  1992-09-28  |  317b  |  12 lines

  1. /* errdiag.h */
  2.  
  3.     /* prototype for definition of ERRCHK macro */
  4.  
  5. void errDiag(int errNumber, char *file, int line);
  6.  
  7.     /* USE THIS MACRO in your code to call errDiag. Just pass it the
  8.     error that your API call returns */
  9.  
  10. #define ERRCHK(err) {if (err) {errDiag(err,__FILE__,__LINE__); exit(0);}}
  11.  
  12.