#include <iostream>
#include <exception>
using namespace std;
class except_local: public exception
{
virtual const char* what() const throw()
{
return "exceptionally";
}
};
int main ()
{
try
{
throw except_local();
}
//
// catches also classes derived from exception
//
catch (exception& e)
{
cout << e.what() << endl;
}
return 0;
}