objsimexception.hpp 573 B

1234567891011121314151617181920212223
  1. #ifndef OBJSIMEXCEPTION_HPP
  2. #define OBJSIMEXCEPTION_HPP
  3. #include <exception>
  4. #include <string>
  5. using namespace std;
  6. /**
  7. @author Frank Michler,,, <frank@pc13365>
  8. */
  9. class ObjSimException : public exception
  10. {
  11. public:
  12. ObjSimException() throw(): ErrorMessage("no error message specified") {};
  13. ObjSimException(const string& _ErrorMessage) throw(): ErrorMessage(_ErrorMessage) {};
  14. ~ObjSimException() throw() {};
  15. virtual const char* what() const throw() {return string("ObjSim Exception: "+ErrorMessage).c_str();};
  16. private:
  17. string ErrorMessage;
  18. };
  19. #endif