/* */ #ifndef _D_EXCEPTION_H_ #define _D_EXCEPTION_H_ #include "common.h" #include "SharedHandle.h" #include namespace aria2 { class Exception:public std::exception { private: const char* _file; int _line; std::string _msg; SharedHandle _cause; protected: virtual SharedHandle copy() const = 0; public: explicit Exception(const char* file, int line, const std::string& msg); Exception(const char* file, int line, const std::string& msg, const Exception& cause); Exception(const char* file, int line, const Exception& e); virtual ~Exception() throw(); virtual const char* what() const throw(); std::string stackTrace() const throw(); }; } // namespace aria2 #endif // _D_EXCEPTION_H_