/* */ #include "OptionHandlerException.h" #include "fmt.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, fmt(MESSAGE.c_str(), optName.c_str()), error_code::OPTION_ERROR), optName_(optName) {} OptionHandlerException::OptionHandlerException(const char* file, int line, const std::string& optName, const Exception& cause): RecoverableException (file, line, fmt(MESSAGE.c_str(), optName.c_str()), error_code::OPTION_ERROR, cause), optName_(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