/* */ #include "OptionHandlerException.h" #include "StringFormat.h" namespace aria2 { const std::string OptionHandlerException::MESSAGE ("Exception occurred while processing option %s:"); OptionHandlerException::OptionHandlerException(const std::string& optName): FatalException (StringFormat(MESSAGE.c_str(), optName.c_str()).str()), _optName(optName) {} OptionHandlerException::OptionHandlerException(const std::string& optName, const Exception& cause): FatalException (StringFormat(MESSAGE.c_str(), optName.c_str()).str(), cause), _optName(optName) {} OptionHandlerException::OptionHandlerException(const OptionHandlerException& e): FatalException(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