summaryrefslogtreecommitdiff
path: root/src/OptionHandlerException.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/OptionHandlerException.h')
-rw-r--r--src/OptionHandlerException.h26
1 files changed, 7 insertions, 19 deletions
diff --git a/src/OptionHandlerException.h b/src/OptionHandlerException.h
index 83bf467e..2304fe0f 100644
--- a/src/OptionHandlerException.h
+++ b/src/OptionHandlerException.h
@@ -35,7 +35,6 @@
#ifndef _D_OPTION_HANDLER_EXCEPTION_H_
#define _D_OPTION_HANDLER_EXCEPTION_H_
#include "FatalException.h"
-#include "StringFormat.h"
namespace aria2 {
@@ -43,30 +42,19 @@ class OptionHandlerException:public FatalException {
private:
std::string _optName;
- static const std::string MESSAGE =
- "Exception occurred while processing option %s:";
+ static const std::string MESSAGE;
protected:
- virtual SharedHandle<Exception> copy() const
- {
- SharedHandle<Exception> e(new OptionHandlerException(*this));
- return e;
- }
+ virtual SharedHandle<Exception> copy() const;
public:
- OptionHandlerException(const std::string& optName):
- FatalException
- (StringFormat(MESSAGE, optName.c_str()).str()), _optName(optName) {}
+ OptionHandlerException(const std::string& optName);
- OptionHandlerException(const std::string& optName,
- const Exception& cause):
- FatalException
- (StringFormat(MESSAGE, optName.c_str()).str(), cause), _optName(optName) {}
+ OptionHandlerException(const std::string& optName, const Exception& cause);
- OptionHandlerException(const OptionHandlerException& e):
- FatalException(e), _optName(e._optName) {}
+ OptionHandlerException(const OptionHandlerException& e);
- virtual ~OptionHandlerException() throw() {}
+ virtual ~OptionHandlerException() throw();
- const std::string& getOptionName() const throw() { return _optName; }
+ const std::string& getOptionName() const throw();
};
} // namespace aria2