home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
ool.zip
/
OOL
/
include
/
xexcept.h
< prev
next >
Wrap
C/C++ Source or Header
|
1997-04-03
|
1KB
|
39 lines
#ifndef __OOL_XEXCEPT_H__
#define __OOL_XEXCEPT_H__
/*===========================================================================*/
/* OOL ------------------- the Open Object Library ------------- OS/2 Beta 1 */
/*===========================================================================*/
/* class: XException */
/* derived from: XObject */
/* last update: 3/97 */
/* programmed by: Stefan von Brauk (sbrauk@gwdg.de) */
/*===========================================================================*/
#include "xobject.h"
#include "xstring.h"
#include <stdio.h>
class XWindow;
#if defined( __WATCOMC__ )
class _export_ XException
#else
class _export_ XException//: public XObject
#endif
{
XString msg, file;
LONG code, line;
public:
XException(char * errorMsg, LONG errorCode, LONG lineNumber=0, char * fileName="")
{ msg = errorMsg; code = errorCode; line = lineNumber; file = fileName; }
char * GetErrorMessage(void) { return (char*) msg; }
LONG GetErrorCode(void) { return code; }
void ShowError( XWindow * w=NULL);
void PrintError(void);
};
#define OOLThrow(a, b) throw( XException(a, b, __LINE__, __FILE__))
#endif