myexception.h
资源名称:c.rar [点击查看]
上传用户:puke2000
上传日期:2022-07-25
资源大小:912k
文件大小:1k
源码类别:
C#编程
开发平台:
Visual C++
- //=====================================
- // myexception.h
- //=====================================
- #ifndef HEADER_MYEXCEPTION
- #define HEADER_MYEXCEPTION
- class MyException{
- public:
- virtual const char* what(){ return "MyException"; }
- };//-----------------------------------
- class HardwareErr : public MyException{
- public:
- virtual const char* what(){ return "HardwareErr"; }
- };//-----------------------------------
- class SizeErr : public MyException{
- public:
- virtual const char* what(){ return "SizeErr"; }
- };//-----------------------------------
- class VSizeErr : public SizeErr{
- public:
- virtual const char* what(){ return "VSizeErr"; }
- };//-----------------------------------
- class HSizeErr : public SizeErr{
- public:
- virtual const char* what(){ return "HSizeErr"; }
- };//-----------------------------------
- class PerformErr : public MyException{
- public:
- virtual const char* what(){ return "PerformErr"; }
- };//-----------------------------------
- class OtherErr : public MyException{
- public:
- virtual const char* what(){ return "OtherErr"; }
- };//-----------------------------------
- #endif // HEADER_MYEXCEPTION