#include <iostream>
#include <stdexcept>
using namespace std;
class SimpleException: public exception { };
class RecommendExc: public runtime_error {
public:
//recommended constructors
RecommendExc() : runtime_error("RecommendExc") { }
RecommendExc(const char* msg) : runtime_error(msg) { }
RecommendExc(const string& msg) : runtime_error(msg) { }
};
//throw SimpleException();
try {
throw RecommendExc("exeption");
}
catch (runtime_error & e) {
cout << e.what();
}