/* */ #ifndef _D_DOWNLOAD_FAILURE_EXCEPTION_H_ #define _D_DOWNLOAD_FAILURE_EXCEPTION_H_ #include "RecoverableException.h" namespace aria2 { /** * Throw this exception when a RequestGroup should aborted. * FYI, DlAbortEx is the exception to abort 1 Request. */ class DownloadFailureException:public RecoverableException { protected: virtual SharedHandle copy() const { SharedHandle e(new DownloadFailureException(*this)); return e; } public: DownloadFailureException(const char* file, int line, const std::string& msg): RecoverableException(file, line, msg) {} DownloadFailureException(const char* file, int line, const std::string& msg, const Exception& cause): RecoverableException(file, line, msg, cause) {} DownloadFailureException(const char* file, int line, const DownloadFailureException& e): RecoverableException(file, line, e) {} DownloadFailureException(const char* file, int line, const std::string& msg, downloadresultcode::RESULT code): RecoverableException(file, line, msg, code) {} }; #define DOWNLOAD_FAILURE_EXCEPTION(arg) \ DownloadFailureException(__FILE__, __LINE__, arg) #define DOWNLOAD_FAILURE_EXCEPTION2(arg1, arg2) \ DownloadFailureException(__FILE__, __LINE__, arg1, arg2) } // namespace aria2 #endif // _D_DOWNLOAD_FAILURE_EXCEPTION_H_