// ========== This file is under LGPL, the GNU Lesser General Public Licence // ========== Dialing Syntax Analysis (www.aot.ru) // ========== Copyright by Alexey Sokirko #ifndef _CEXPC_HPP__ #define _CEXPC_HPP__ 1 #include #include class CExpc: public std::exception { public: std::string m_strCause; int m_ErrorCode; inline CExpc(const std::string& Cause, int ErrorCode = -1) { m_strCause = Cause; m_ErrorCode = ErrorCode; } inline CExpc(const CExpc& from) { *this = from; } inline const char * what() const throw() { try { return m_strCause.c_str(); } catch(...) { return NULL; } } inline CExpc& operator= (const CExpc& from) { m_strCause = from.m_strCause; return *this; } inline ~CExpc() throw() { ;; } }; #endif // _CEXPC_HPP__ // End.