1 2 #include "exceptions.h" 3 ExceptionBase()4ExceptionBase::ExceptionBase() {} ~ExceptionBase()5ExceptionBase::~ExceptionBase() {} 6 ExceptionA()7ExceptionA::ExceptionA() {} ~ExceptionA()8ExceptionA::~ExceptionA() {} 9 ExceptionB()10ExceptionB::ExceptionB() {} ~ExceptionB()11ExceptionB::~ExceptionB() {} 12 VirtualExceptionBase()13VirtualExceptionBase::VirtualExceptionBase() {} ~VirtualExceptionBase()14VirtualExceptionBase::~VirtualExceptionBase() {} 15 VirtualExceptionA()16VirtualExceptionA::VirtualExceptionA() {} ~VirtualExceptionA()17VirtualExceptionA::~VirtualExceptionA() {} 18 VirtualExceptionB()19VirtualExceptionB::VirtualExceptionB() {} ~VirtualExceptionB()20VirtualExceptionB::~VirtualExceptionB() {} 21 throwBase()22void throwBase() { throw ExceptionBase(); } throwA()23void throwA() { throw ExceptionA(); } throwB()24void throwB() { throw ExceptionB(); } throwVirtualBase()25void throwVirtualBase() { throw VirtualExceptionBase(); } throwVirtualA()26void throwVirtualA() { throw VirtualExceptionA(); } throwVirtualB()27void throwVirtualB() { throw VirtualExceptionB(); } throwInt()28void throwInt() { throw int(7); } 29