diff options
author | Joe George <joe@zeroc.com> | 2016-06-09 14:50:25 -0400 |
---|---|---|
committer | Joe George <joe@zeroc.com> | 2016-06-10 16:18:16 -0400 |
commit | 099dc25550da1e1612a6508c3e18954dbc01e6cd (patch) | |
tree | 348c81e88e50a4a84eee94672022c89ac935c5a2 /cpp/src/IceUtil | |
parent | Restored serveramd on Linux/OSX (diff) | |
download | ice-099dc25550da1e1612a6508c3e18954dbc01e6cd.tar.bz2 ice-099dc25550da1e1612a6508c3e18954dbc01e6cd.tar.xz ice-099dc25550da1e1612a6508c3e18954dbc01e6cd.zip |
ICE-7176 - Cleanup exception dtor noexcept
Diffstat (limited to 'cpp/src/IceUtil')
-rw-r--r-- | cpp/src/IceUtil/Options.cpp | 12 | ||||
-rw-r--r-- | cpp/src/IceUtil/UtilException.cpp | 51 |
2 files changed, 32 insertions, 31 deletions
diff --git a/cpp/src/IceUtil/Options.cpp b/cpp/src/IceUtil/Options.cpp index ebfb3eb1208..55615665a11 100644 --- a/cpp/src/IceUtil/Options.cpp +++ b/cpp/src/IceUtil/Options.cpp @@ -20,9 +20,11 @@ IceUtilInternal::APIException::APIException(const char* file, int line, const st { } -IceUtilInternal::APIException::~APIException() ICE_NOEXCEPT +#ifndef ICE_CPP11_COMPILER +IceUtilInternal::APIException::~APIException() throw() { } +#endif string IceUtilInternal::APIException::ice_id() const @@ -66,9 +68,11 @@ IceUtilInternal::BadOptException::BadOptException(const char* file, int line, co { } -IceUtilInternal::BadOptException::~BadOptException() ICE_NOEXCEPT +#ifndef ICE_CPP11_COMPILER +IceUtilInternal::BadOptException::~BadOptException() throw() { } +#endif string IceUtilInternal::BadOptException::ice_id() const @@ -174,7 +178,7 @@ void IceUtilInternal::Options::addOpt(const string& shortOpt, const string& longOpt, ArgType at, string dflt, RepeatType rt) { RecMutex::Lock sync(_m); - + if(parseCalled) { throw APIException(__FILE__, __LINE__, "cannot add options after parse() was called"); @@ -465,7 +469,7 @@ IceUtilInternal::Options::split(const string& line) Int64 ull = 0; string::size_type j; - for(j = i + 1; j < i + 3 && j < l.size() && + for(j = i + 1; j < i + 3 && j < l.size() && isxdigit(static_cast<unsigned char>(c = l[j])); ++j) { ull *= 16; diff --git a/cpp/src/IceUtil/UtilException.cpp b/cpp/src/IceUtil/UtilException.cpp index 7a9cfb9d776..ec15dc7bff7 100644 --- a/cpp/src/IceUtil/UtilException.cpp +++ b/cpp/src/IceUtil/UtilException.cpp @@ -74,7 +74,7 @@ using namespace std; namespace IceUtilInternal { -#ifdef NDEBUG +#ifdef NDEBUG bool ICE_API printStackTraces = false; #else bool ICE_API printStackTraces = true; @@ -578,9 +578,11 @@ IceUtil::Exception::Exception(const char* file, int line) : { } -IceUtil::Exception::~Exception() ICE_NOEXCEPT +#ifndef ICE_CPP11_COMPILER +IceUtil::Exception::~Exception() throw() { } +#endif void IceUtil::Exception::ice_print(ostream& out) const @@ -614,12 +616,6 @@ IceUtil::Exception::what() const ICE_NOEXCEPT return ""; } -string -IceUtil::Exception::ice_id() const -{ - return "::IceUtil::Exception"; -} - #ifdef ICE_CPP11_MAPPING exception_ptr IceUtil::Exception::ice_clone() const @@ -642,20 +638,8 @@ IceUtil::Exception::ice_name() const { return ice_id().substr(2); } - -IceUtil::Exception* -IceUtil::Exception::ice_clone() const -{ - return new Exception(*this); -} #endif -void -IceUtil::Exception::ice_throw() const -{ - throw *this; -} - const char* IceUtil::Exception::ice_file() const { @@ -690,9 +674,11 @@ IceUtil::NullHandleException::NullHandleException(const char* file, int line) : } } -IceUtil::NullHandleException::~NullHandleException() ICE_NOEXCEPT +#ifndef ICE_CPP11_COMPILER +IceUtil::NullHandleException::~NullHandleException() throw() { } +#endif string IceUtil::NullHandleException::ice_id() const @@ -725,9 +711,11 @@ IceUtil::IllegalArgumentException::IllegalArgumentException(const char* file, in { } -IceUtil::IllegalArgumentException::~IllegalArgumentException() ICE_NOEXCEPT +#ifndef ICE_CPP11_COMPILER +IceUtil::IllegalArgumentException::~IllegalArgumentException() throw() { } +#endif void IceUtil::IllegalArgumentException::ice_print(ostream& out) const @@ -775,8 +763,11 @@ IceUtil::IllegalConversionException::IllegalConversionException(const char* file _reason(reason) {} -IceUtil::IllegalConversionException::~IllegalConversionException() ICE_NOEXCEPT -{} +#ifndef ICE_CPP11_COMPILER +IceUtil::IllegalConversionException::~IllegalConversionException() throw() +{ +} +#endif void IceUtil::IllegalConversionException::ice_print(ostream& out) const @@ -864,9 +855,11 @@ IceUtil::FileLockException::FileLockException(const char* file, int line, int er { } -IceUtil::FileLockException::~FileLockException() ICE_NOEXCEPT +#ifndef ICE_CPP11_COMPILER +IceUtil::FileLockException::~FileLockException() throw() { } +#endif void IceUtil::FileLockException::ice_print(ostream& os) const @@ -914,9 +907,11 @@ IceUtil::OptionalNotSetException::OptionalNotSetException(const char* file, int } } -IceUtil::OptionalNotSetException::~OptionalNotSetException() ICE_NOEXCEPT +#ifndef ICE_CPP11_COMPILER +IceUtil::OptionalNotSetException::~OptionalNotSetException() throw() { } +#endif string IceUtil::OptionalNotSetException::ice_id() const @@ -945,9 +940,11 @@ IceUtil::IconvInitializationException::IconvInitializationException(const char* { } -IceUtil::IconvInitializationException::~IconvInitializationException() ICE_NOEXCEPT +#ifndef ICE_CPP11_COMPILER +IceUtil::IconvInitializationException::~IconvInitializationException() throw() { } +#endif void IceUtil::IconvInitializationException::ice_print(ostream& out) const |