⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 warexception.h

📁 ftpserver very good sample
💻 H
字号:
/** The WarLibrary's exception object. * * #include "WarException.h" <BR> * -llib  * * @doc Any exceptions thrown by the  * WarLibrary is of this type (or derievd * from this type).  *   * @see WarError */#ifndef WAR_EXCEPTION_H#define WAR_EXCEPTION_H/* SYSTEM INCLUDES */#ifndef WAR_EXCEPTION_INCLUDED#   define WAR_EXCEPTION_INCLUDED#   include <exception>#endif/* PROJECT INCLUDES */#ifndef WAR_ERROR_H#   include "WarError.h"#endif/* LOCAL INCLUDES *//* FORWARD REFERENCES */#ifdef __cplusplusextern "C" {#endif/****************** BEGIN OLD STYLE C spesific ********//****************** END OLD STYLE C spesific **********/#ifdef __cplusplus }#endif/****************** BEGIN C++ spesific ****************/#ifdef __cplusplusclass WarException : public std::exception,public WarError{public:    // LIFECYCLE        /**    * Default constructor.    */    WarException(const war_error_definitions local_error,             const int system_error = 0,             war_ccstr_t message = NULL,             war_ccstr_t source_file = __FILE__,             const int source_line = __LINE__);    /**    * Inherit WarError constructor.    */    WarException(const WarError& err,             war_ccstr_t message = NULL);    /** Copy constructor    */    WarException(const WarException& from);            /**    * Destructor.    */    virtual ~WarException() throw();        // OPERATORS    // OPERATIONS                           virtual const std::string& Explain() const;    virtual const char *what() const throw();    // ACCESS    // INQUIRY    protected:    std::string mMessage;private:};/* INLINE METHODS *//* EXTERNAL REFERENCES *////#define WarThrow(err, msg)\throw WarException(WarError(err.LocalError(), err.SystemError(), __FILE__, __LINE__), msg)#ifdef WIN32#   define WarThrowSyserr(msg) \    throw WarException(WarError(WAR_ERR_SYSTEM_ERROR, ::GetLastError(), __FILE__, __LINE__), msg)#else#   define WarThrowSyserr(msg) \    throw WarException(WarError(WAR_ERR_SYSTEM_ERROR, errno, __FILE__, __LINE__), msg)#endif#endif /* __cplusplus *//****************** END C++ spesific ******************/#endif  /* _WAR_EXCEPTION_H_ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -