.. _program_listing_file__tmp_ws_src_ecl_core_ecl_exceptions_include_ecl_exceptions_standard_exception.hpp: Program Listing for File standard_exception.hpp =============================================== |exhale_lsh| :ref:`Return to documentation for file ` (``/tmp/ws/src/ecl_core/ecl_exceptions/include/ecl/exceptions/standard_exception.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp /***************************************************************************** ** Ifdefs *****************************************************************************/ #ifndef ECL_EXCEPTIONS_STANDARD_EXCEPTION_HPP_ #define ECL_EXCEPTIONS_STANDARD_EXCEPTION_HPP_ /***************************************************************************** ** Disable check *****************************************************************************/ #include #ifndef ECL_DISABLE_EXCEPTIONS /***************************************************************************** ** Includes *****************************************************************************/ #include #include "exception.hpp" #include #include #include /***************************************************************************** ** Namespaces *****************************************************************************/ namespace ecl { /***************************************************************************** ** Interface [StandardException] *****************************************************************************/ class ecl_exceptions_PUBLIC StandardException : public Exception { public: StandardException(const char* loc, ErrorFlag error ); StandardException(const char* loc, ErrorFlag error, const std::string &msg ); StandardException(const char* loc, const StandardException &e ); virtual ~StandardException() throw() {} const char* what() const throw(); const std::string& message() const { return detailed_message; }; const ErrorFlag& flag() const { return error_flag; } private: void create_combined_message(); const ErrorFlag error_flag; std::string detailed_message; std::string combined_message; }; } // namespace ecl #endif /* ECL_DISABLE_EXCEPTIONS */ #endif /*ECL_EXCEPTIONS_STANDARD_EXCEPTION_HPP_*/