#ifndef __SIMPLE_EXCEPTION_H__ #define __SIMPLE_EXCEPTION_H__ //...................... // SimpleException //...................... class SimpleException:public std::exception { public: SimpleException(string str){ msg = str;} virtual ~SimpleException() throw(){} virtual const char* what(void) const throw() { return msg.c_str(); } private: string msg; }; #endif // __SIMPLE_EXCEPTION_H__