/* */ #include "UnknownOptionException.h" #include "fmt.h" namespace aria2 { namespace { const char* MESSAGE = _("Unknown option '%s'"); } // namespace UnknownOptionException::UnknownOptionException(const char* file, int line, const std::string& unknownOption) : RecoverableException(file, line, fmt(MESSAGE, unknownOption.c_str()), error_code::OPTION_ERROR), unknownOption_(unknownOption) { } UnknownOptionException::UnknownOptionException(const char* file, int line, const std::string& unknownOption, const Exception& cause) : RecoverableException(file, line, fmt(MESSAGE, unknownOption.c_str()), error_code::OPTION_ERROR, cause), unknownOption_(unknownOption) { } UnknownOptionException::~UnknownOptionException() throw() = default; std::shared_ptr UnknownOptionException::copy() const { return std::make_shared(*this); } } // namespace aria2