1*93aeb8c3SIngo Weinhold 2*93aeb8c3SIngo Weinhold #ifndef EXCEPTIONS_H 3*93aeb8c3SIngo Weinhold #define EXCEPTIONS_H 4*93aeb8c3SIngo Weinhold 5*93aeb8c3SIngo Weinhold struct ExceptionBase { 6*93aeb8c3SIngo Weinhold ExceptionBase(); 7*93aeb8c3SIngo Weinhold ~ExceptionBase(); 8*93aeb8c3SIngo Weinhold }; 9*93aeb8c3SIngo Weinhold 10*93aeb8c3SIngo Weinhold struct ExceptionA : ExceptionBase { 11*93aeb8c3SIngo Weinhold ExceptionA(); 12*93aeb8c3SIngo Weinhold ~ExceptionA(); 13*93aeb8c3SIngo Weinhold 14*93aeb8c3SIngo Weinhold int a; 15*93aeb8c3SIngo Weinhold }; 16*93aeb8c3SIngo Weinhold 17*93aeb8c3SIngo Weinhold struct ExceptionB : ExceptionBase { 18*93aeb8c3SIngo Weinhold ExceptionB(); 19*93aeb8c3SIngo Weinhold ~ExceptionB(); 20*93aeb8c3SIngo Weinhold 21*93aeb8c3SIngo Weinhold int b; 22*93aeb8c3SIngo Weinhold }; 23*93aeb8c3SIngo Weinhold 24*93aeb8c3SIngo Weinhold struct VirtualExceptionBase : ExceptionBase { 25*93aeb8c3SIngo Weinhold VirtualExceptionBase(); 26*93aeb8c3SIngo Weinhold virtual ~VirtualExceptionBase(); 27*93aeb8c3SIngo Weinhold }; 28*93aeb8c3SIngo Weinhold 29*93aeb8c3SIngo Weinhold struct VirtualExceptionA : VirtualExceptionBase { 30*93aeb8c3SIngo Weinhold VirtualExceptionA(); 31*93aeb8c3SIngo Weinhold virtual ~VirtualExceptionA(); 32*93aeb8c3SIngo Weinhold 33*93aeb8c3SIngo Weinhold int a; 34*93aeb8c3SIngo Weinhold }; 35*93aeb8c3SIngo Weinhold 36*93aeb8c3SIngo Weinhold struct VirtualExceptionB : VirtualExceptionBase { 37*93aeb8c3SIngo Weinhold VirtualExceptionB(); 38*93aeb8c3SIngo Weinhold virtual ~VirtualExceptionB(); 39*93aeb8c3SIngo Weinhold 40*93aeb8c3SIngo Weinhold int b; 41*93aeb8c3SIngo Weinhold }; 42*93aeb8c3SIngo Weinhold 43*93aeb8c3SIngo Weinhold void throwBase(); 44*93aeb8c3SIngo Weinhold void throwA(); 45*93aeb8c3SIngo Weinhold void throwB(); 46*93aeb8c3SIngo Weinhold void throwVirtualBase(); 47*93aeb8c3SIngo Weinhold void throwVirtualA(); 48*93aeb8c3SIngo Weinhold void throwVirtualB(); 49*93aeb8c3SIngo Weinhold void throwInt(); 50*93aeb8c3SIngo Weinhold 51*93aeb8c3SIngo Weinhold 52*93aeb8c3SIngo Weinhold #endif // EXCEPTIONS_H 53