📄 exception.h
字号:
/****************************************************************************
* COPYRIGHT FJMCC/Newland/Hewlett Packard 2002. *
* All rights reserved. *
*---------------------------------------------------------------------------*
* Module: *
* Exception.h -- Exception *
* Descrption: *
* 异常类 *
* Date: *
* 19-Mar-2002 *
* ------------------------------------------------------------------------- *
* Author: *
* 胡春雨 *
* Version: *
* 1.0: initial version *
*****************************************************************************/
#ifndef __EXCEPTION_H
#define __EXCEPTION_H
#include <string.h>
#include <string>
#include "MdbErrCode.h"
using std::string;
//#include "GlobalDefs.h"
class Exception
{
public:
Exception(const int errClass, const int errCode, const char *eventMsg);
Exception(const Exception& except);
Exception& operator=(const Exception& other);
virtual ~Exception();
virtual int getErrClass () { return _class; } //获取异常种类代码
virtual int getErrCode () { return _code; } //获取异常编码
virtual char* getEventMsg () { return _eventMsg; } //获取异常事件信息
protected:
int _class; // 异常种类
int _code; // 异常编码
char *_eventMsg; // 事件信息
};
void throwException(int nClass,int nCode,const char *pMsg,...);
#endif // !__EXCEPTION_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -