/* */ #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())), 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()), 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