.. _program_listing_file__tmp_ws_src_ecl_core_ecl_exceptions_include_ecl_exceptions_posix_error_handler.hpp: Program Listing for File posix_error_handler.hpp ================================================ |exhale_lsh| :ref:`Return to documentation for file ` (``/tmp/ws/src/ecl_core/ecl_exceptions/include/ecl/exceptions/posix_error_handler.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp /***************************************************************************** ** Ifdefs *****************************************************************************/ #ifndef ECL_EXCEPTIONS_POSIX_EXCEPTION_HPP_ #define ECL_EXCEPTIONS_POSIX_EXCEPTION_HPP_ /***************************************************************************** ** Disable check *****************************************************************************/ #include #ifndef ECL_DISABLE_EXCEPTIONS /***************************************************************************** ** Includes *****************************************************************************/ #include // strerror function #include #include #include "standard_exception.hpp" /***************************************************************************** ** Namespaces *****************************************************************************/ namespace ecl { /***************************************************************************** ** Interface [PosixErrorHandler] *****************************************************************************/ template class ecl_exceptions_PUBLIC PosixErrorHandler { public: static StandardException GenerateStandardException(const char* loc) { return StandardException(loc, PosixError, std::string(strerror(errno))+"."); } virtual ~PosixErrorHandler() {} }; } // namespace ecl #endif /* ECL_DISABLE_EXCEPTIONS */ #endif /* ECL_EXCEPTIONS_POSIX_EXCEPTION_HPP_ */