/* */ #include "OptionHandlerException.h" #include "StringFormat.h" namespace aria2 { const std::string OptionHandlerException::MESSAGE ("We encountered a problem while processing the option '--%s'."); OptionHandlerException::OptionHandlerException(const char* file, int line, const std::string& optName): RecoverableException (file, line, StringFormat(MESSAGE.c_str(), optName.c_str()).str()), _optName(optName) {} OptionHandlerException::OptionHandlerException(const char* file, int line, const std::string& optName, const Exception& cause): RecoverableException (file, line, StringFormat(MESSAGE.c_str(), optName.c_str()).str(), cause), _optName(optName) {} OptionHandlerException::OptionHandlerException(const char* file, int line, const OptionHandlerException& e): RecoverableException(file, line, e), _optName(e._optName) {} OptionHandlerException::~OptionHandlerException() throw() {} const std::string& OptionHandlerException::getOptionName() const throw() { return _optName; } SharedHandle OptionHandlerException::copy() const { SharedHandle e(new OptionHandlerException(*this)); return e; } } // namespace aria2