- /// Base of all exceptions in the library
- class Exception: public std::exception
- {
- protected:
- std::string m_strMsg ; ///< Exception message
- public:
- /// Create empty exception
- Exception()
- {}
- /// Create exception with message
- explicit Exception( const char * pszMsg )
- : m_strMsg( pszMsg )
- {}
- /// Create exception with message
- explicit Exception( const std::string& strMsg )
- :m_strMsg( strMsg )
- {}
-
- /// Destructor
- virtual ~Exception() throw()
- {}
-
- /// Return exception message
- virtual const char * what( ) const throw()
- {
- return m_strMsg.c_str();
- }
- };
-