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