diff --git a/src/DlAbortEx.cc b/src/DlAbortEx.cc index 886b4874..beb6d18d 100644 --- a/src/DlAbortEx.cc +++ b/src/DlAbortEx.cc @@ -49,12 +49,9 @@ DlAbortEx::DlAbortEx(const char* file, int line, const std::string& msg, const Exception& cause): RecoverableException(file, line, msg, cause) {} -DlAbortEx::DlAbortEx(const char* file, int line, const RecoverableException& e): - RecoverableException(file, line, e) {} - DlAbortEx::DlAbortEx -(const char* file, int line, int errnoArg, const std::string& msg): - RecoverableException(file, line, errnoArg, msg) {} +(const char* file, int line, int errNum, const std::string& msg): + RecoverableException(file, line, errNum, msg) {} DlAbortEx::DlAbortEx(const char* file, int line, const std::string& msg, error_code::Value code): diff --git a/src/DlAbortEx.h b/src/DlAbortEx.h index 83a7a001..bf6378e8 100644 --- a/src/DlAbortEx.h +++ b/src/DlAbortEx.h @@ -47,9 +47,7 @@ public: DlAbortEx(const char* file, int line, const std::string& msg, const Exception& cause); - DlAbortEx(const char* file, int line, const RecoverableException& e); - - DlAbortEx(const char* file, int line, int errnoArg, const std::string& msg); + DlAbortEx(const char* file, int line, int errNum, const std::string& msg); DlAbortEx(const char* file, int line, const std::string& msg, error_code::Value code); diff --git a/src/DlRetryEx.cc b/src/DlRetryEx.cc index 5f3ebfbe..8bbbfa33 100644 --- a/src/DlRetryEx.cc +++ b/src/DlRetryEx.cc @@ -48,8 +48,7 @@ DlRetryEx::DlRetryEx(const char* file, int line, const std::string& msg): DlRetryEx::DlRetryEx(const char* file, int line, const std::string& msg, const Exception& cause): RecoverableException(file, line, msg, cause) {} -DlRetryEx::DlRetryEx(const char* file, int line, const DlRetryEx& e): - RecoverableException(file, line, e) {} + DlRetryEx::DlRetryEx(const char* file, int line, const std::string& msg, error_code::Value code): RecoverableException(file, line, msg, code) {} diff --git a/src/DlRetryEx.h b/src/DlRetryEx.h index dc814990..dcecb357 100644 --- a/src/DlRetryEx.h +++ b/src/DlRetryEx.h @@ -47,8 +47,6 @@ public: DlRetryEx(const char* file, int line, const std::string& msg, const Exception& cause); - DlRetryEx(const char* file, int line, const DlRetryEx& e); - DlRetryEx(const char* file, int line, const std::string& msg, error_code::Value code); }; diff --git a/src/DownloadFailureException.cc b/src/DownloadFailureException.cc index d10513ad..cc0113b5 100644 --- a/src/DownloadFailureException.cc +++ b/src/DownloadFailureException.cc @@ -51,11 +51,6 @@ DownloadFailureException::DownloadFailureException const Exception& cause): RecoverableException(file, line, msg, cause) {} -DownloadFailureException::DownloadFailureException -(const char* file, int line, - const DownloadFailureException& e): - RecoverableException(file, line, e) {} - DownloadFailureException::DownloadFailureException (const char* file, int line, const std::string& msg, diff --git a/src/DownloadFailureException.h b/src/DownloadFailureException.h index 774e0bed..2bf7faa3 100644 --- a/src/DownloadFailureException.h +++ b/src/DownloadFailureException.h @@ -51,9 +51,6 @@ public: DownloadFailureException(const char* file, int line, const std::string& msg, const Exception& cause); - DownloadFailureException(const char* file, int line, - const DownloadFailureException& e); - DownloadFailureException(const char* file, int line, const std::string& msg, error_code::Value code); diff --git a/src/Exception.cc b/src/Exception.cc index 6b1565c9..f34261f2 100644 --- a/src/Exception.cc +++ b/src/Exception.cc @@ -60,17 +60,6 @@ Exception::Exception cause_(cause.copy()) {} -Exception::Exception -(const char* file, - int line, - const Exception& e) - : file_(file), - line_(line), - errNum_(0), - msg_(e.msg_), - cause_(e.cause_) -{} - Exception::Exception (const char* file, int line, diff --git a/src/Exception.h b/src/Exception.h index a5724c2e..b17803ae 100644 --- a/src/Exception.h +++ b/src/Exception.h @@ -59,13 +59,11 @@ protected: virtual SharedHandle copy() const = 0; public: - explicit Exception(const char* file, int line, const std::string& msg); + Exception(const char* file, int line, const std::string& msg); Exception(const char* file, int line, const std::string& msg, const Exception& cause); - Exception(const char* file, int line, const Exception& e); - Exception(const char* file, int line, int errNum, const std::string& msg); virtual ~Exception() throw(); diff --git a/src/FatalException.cc b/src/FatalException.cc index 826929b0..b4c60f7f 100644 --- a/src/FatalException.cc +++ b/src/FatalException.cc @@ -51,6 +51,4 @@ FatalException::FatalException const Exception& cause): Exception(file, line, msg, cause) {} -FatalException::FatalException(const FatalException& e):Exception(e) {} - } // namespace aria2 diff --git a/src/FatalException.h b/src/FatalException.h index 8b6e3e3b..852ae613 100644 --- a/src/FatalException.h +++ b/src/FatalException.h @@ -46,8 +46,6 @@ public: FatalException(const char* file, int line, const std::string& msg, const Exception& cause); - - FatalException(const FatalException& e); }; #define FATAL_EXCEPTION(arg) \ diff --git a/src/OptionHandlerException.cc b/src/OptionHandlerException.cc index 0e4489ac..fa737465 100644 --- a/src/OptionHandlerException.cc +++ b/src/OptionHandlerException.cc @@ -53,10 +53,6 @@ OptionHandlerException::OptionHandlerException(const char* file, int line, (file, line, fmt(MESSAGE.c_str(), optName.c_str()), cause), optName_(optName) {} -OptionHandlerException::OptionHandlerException(const char* file, int line, - const OptionHandlerException& e): - RecoverableException(file, line, e), optName_(e.optName_) {} - OptionHandlerException::~OptionHandlerException() throw() {} const std::string& OptionHandlerException::getOptionName() const throw() diff --git a/src/OptionHandlerException.h b/src/OptionHandlerException.h index 9eb024a8..46f92e54 100644 --- a/src/OptionHandlerException.h +++ b/src/OptionHandlerException.h @@ -52,9 +52,6 @@ public: OptionHandlerException(const char* file, int line, const std::string& optName, const Exception& cause); - OptionHandlerException(const char* file, int line, - const OptionHandlerException& e); - virtual ~OptionHandlerException() throw(); const std::string& getOptionName() const throw(); diff --git a/src/RecoverableException.cc b/src/RecoverableException.cc index 58b47049..d4164bf0 100644 --- a/src/RecoverableException.cc +++ b/src/RecoverableException.cc @@ -54,14 +54,8 @@ RecoverableException::RecoverableException code_(error_code::UNKNOWN_ERROR) {} RecoverableException::RecoverableException -(const char* file, int line, - const RecoverableException& e): - Exception(file, line, e), - code_(error_code::UNKNOWN_ERROR) {} - -RecoverableException::RecoverableException -(const char* file, int line, int errnoArg, const std::string& msg): - Exception(file, line, errnoArg, msg), +(const char* file, int line, int errNum, const std::string& msg): + Exception(file, line, errNum, msg), code_(error_code::UNKNOWN_ERROR) {} RecoverableException::RecoverableException diff --git a/src/RecoverableException.h b/src/RecoverableException.h index d665a170..fe0b4b80 100644 --- a/src/RecoverableException.h +++ b/src/RecoverableException.h @@ -51,11 +51,8 @@ public: RecoverableException(const char* file, int line, const std::string& msg, const Exception& cause); - RecoverableException(const char* file, int line, - const RecoverableException& e); - RecoverableException - (const char* file, int line, int errnoArg, const std::string& msg); + (const char* file, int line, int errNum, const std::string& msg); RecoverableException(const char* file, int line, const std::string& msg, error_code::Value result);