/* */ #include "OptionHandlerException.h" #include "fmt.h" namespace aria2 { namespace { const char* MESSAGE = _("We encountered a problem while processing the option '--%s'."); } // namespace OptionHandlerException::OptionHandlerException (const char* file, int line, PrefPtr pref) : RecoverableException (file, line, fmt(MESSAGE, pref->k), error_code::OPTION_ERROR), pref_(pref) {} OptionHandlerException::OptionHandlerException (const char* file, int line, PrefPtr pref, const Exception& cause) : RecoverableException (file, line, fmt(MESSAGE, pref->k), error_code::OPTION_ERROR, cause), pref_(pref) {} OptionHandlerException::~OptionHandlerException() throw() {} std::shared_ptr OptionHandlerException::copy() const { std::shared_ptr e(new OptionHandlerException(*this)); return e; } } // namespace aria2