summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2016-01-20 10:36:51 +0100
committerJose <jose@zeroc.com>2016-01-20 10:36:51 +0100
commit13f4fd6d3cc5a044db66d9c25319419bb4ede5fa (patch)
treec230ae28caba40ac1f939fbedb5fd780d49fad0c
parentICE-6861 - removing public stream API (diff)
downloadice-13f4fd6d3cc5a044db66d9c25319419bb4ede5fa.tar.bz2
ice-13f4fd6d3cc5a044db66d9c25319419bb4ede5fa.tar.xz
ice-13f4fd6d3cc5a044db66d9c25319419bb4ede5fa.zip
ice_name/ice_id fixes & simplifications.
-rw-r--r--cpp/include/Glacier2/Application.h4
-rw-r--r--cpp/include/Ice/Exception.h9
-rw-r--r--cpp/include/IceSSL/Plugin.h18
-rw-r--r--cpp/include/IceUtil/CtrlCHandler.h4
-rw-r--r--cpp/include/IceUtil/Exception.h16
-rw-r--r--cpp/include/IceUtil/Options.h20
-rw-r--r--cpp/include/IceUtil/ThreadException.h47
-rw-r--r--cpp/include/IceXML/Parser.h6
-rw-r--r--cpp/include/Slice/FileTracker.h6
-rw-r--r--cpp/src/Glacier2Lib/Application.cpp6
-rw-r--r--cpp/src/Ice/Exception.cpp4
-rw-r--r--cpp/src/IceDB/IceDB.cpp30
-rw-r--r--cpp/src/IceDB/IceDB.h18
-rw-r--r--cpp/src/IceSSL/Certificate.cpp30
-rw-r--r--cpp/src/IceStorm/Parser.cpp9
-rw-r--r--cpp/src/IceUtil/CtrlCHandler.cpp13
-rw-r--r--cpp/src/IceUtil/Exception.cpp45
-rw-r--r--cpp/src/IceUtil/Options.cpp20
-rw-r--r--cpp/src/IceUtil/ThreadException.cpp48
-rw-r--r--cpp/src/IceXML/Parser.cpp10
-rw-r--r--cpp/src/Slice/FileTracker.cpp10
-rw-r--r--cpp/src/Slice/PythonUtil.cpp5
-rw-r--r--cpp/src/slice2cpp/Gen.cpp7
-rw-r--r--cpp/src/slice2cs/Gen.cpp9
-rw-r--r--cpp/src/slice2java/Gen.cpp10
-rw-r--r--cpp/src/slice2objc/Gen.cpp9
-rw-r--r--cpp/src/slice2php/Main.cpp11
-rw-r--r--cpp/test/Ice/interceptor/MyObjectI.cpp12
-rw-r--r--cpp/test/Ice/interceptor/MyObjectI.h5
-rw-r--r--cpp/test/Ice/plugin/Plugin.cpp6
-rw-r--r--cpp/test/Ice/retry/SystemFailure.h7
-rw-r--r--cpp/test/include/TestCommon.h6
-rw-r--r--csharp/src/Ice/Exception.cs5
-rw-r--r--csharp/src/IceSSL/RFC2253.cs4
-rw-r--r--csharp/test/Ice/interceptor/MyObjectI.cs9
-rw-r--r--csharp/test/Ice/retry/SystemFailure.cs11
-rw-r--r--java/src/Ice/src/main/java/Ice/Exception.java7
-rw-r--r--java/src/Ice/src/main/java/Ice/UserException.java7
-rw-r--r--java/src/Ice/src/main/java/IceSSL/RFC2253.java7
-rw-r--r--java/test/src/main/java/test/Ice/interceptor/MySystemException.java9
-rw-r--r--java/test/src/main/java/test/Ice/retry/SystemFailure.java9
-rw-r--r--objective-c/src/Ice/Exception.mm3
-rw-r--r--objective-c/src/Ice/ObjectAdapterI.mm7
-rw-r--r--objective-c/src/Ice/Stream.mm14
-rw-r--r--objective-c/src/Ice/Util.h2
-rw-r--r--objective-c/src/Ice/Util.mm6
-rw-r--r--php/lib/Ice.php6
-rw-r--r--php/lib/Ice_ns.php8
-rw-r--r--php/src/IcePHP/Types.cpp8
-rw-r--r--php/src/IcePHP/Types.h4
-rw-r--r--python/modules/IcePy/Types.cpp16
-rw-r--r--python/modules/IcePy/Types.h8
-rw-r--r--python/python/Ice.py2
-rw-r--r--ruby/src/IceRuby/Types.cpp10
-rw-r--r--ruby/src/IceRuby/Types.h4
55 files changed, 216 insertions, 410 deletions
diff --git a/cpp/include/Glacier2/Application.h b/cpp/include/Glacier2/Application.h
index 36a4e2ca6da..0c0a1e29e3b 100644
--- a/cpp/include/Glacier2/Application.h
+++ b/cpp/include/Glacier2/Application.h
@@ -27,8 +27,10 @@ class GLACIER2_API RestartSessionException : public IceUtil::Exception
{
public:
- virtual std::string ice_name() const;
+ virtual std::string ice_id() const;
+#ifndef ICE_CPP11_MAPPING
virtual RestartSessionException* ice_clone() const;
+#endif
virtual void ice_throw() const;
};
diff --git a/cpp/include/Ice/Exception.h b/cpp/include/Ice/Exception.h
index 349e9ef5d78..c4477bb8000 100644
--- a/cpp/include/Ice/Exception.h
+++ b/cpp/include/Ice/Exception.h
@@ -47,10 +47,7 @@ public:
virtual ~LocalException() ICE_NOEXCEPT;
virtual std::string ice_id() const = 0;
-#ifndef ICE_CPP11_MAPPING
- ICE_DEPRECATED_API("ice_name() is deprecated, use ice_id() instead.")
- virtual std::string ice_name() const = 0;
-
+#ifndef ICE_CPP11_MAPPING
virtual LocalException* ice_clone() const = 0;
#endif
virtual void ice_throw() const = 0;
@@ -63,8 +60,6 @@ public:
virtual std::string ice_id() const = 0;
#ifndef ICE_CPP11_MAPPING
- ICE_DEPRECATED_API("ice_name() is deprecated, use ice_id() instead.")
- virtual std::string ice_name() const = 0;
virtual UserException* ice_clone() const = 0;
#endif
virtual void ice_throw() const = 0;
@@ -90,8 +85,6 @@ public:
virtual ~SystemException() ICE_NOEXCEPT;
virtual std::string ice_id() const = 0;
#ifndef ICE_CPP11_MAPPING
- ICE_DEPRECATED_API("ice_name() is deprecated.")
- virtual std::string ice_name() const = 0;
virtual SystemException* ice_clone() const = 0;
#endif
virtual void ice_throw() const = 0;
diff --git a/cpp/include/IceSSL/Plugin.h b/cpp/include/IceSSL/Plugin.h
index 79b27af95fc..c9333492534 100644
--- a/cpp/include/IceSSL/Plugin.h
+++ b/cpp/include/IceSSL/Plugin.h
@@ -105,9 +105,11 @@ class ICE_SSL_API CertificateReadException : public IceUtil::Exception
public:
CertificateReadException(const char*, int, const std::string&);
- virtual ~CertificateReadException() throw();
- virtual std::string ice_name() const;
+ virtual ~CertificateReadException() ICE_NOEXCEPT;
+ virtual std::string ice_id() const;
+#ifndef ICE_CPP11_MAPPING
virtual CertificateReadException* ice_clone() const;
+#endif
virtual void ice_throw() const;
std::string reason;
@@ -128,9 +130,11 @@ public:
#ifdef ICE_USE_SECURE_TRANSPORT
CertificateEncodingException(const char*, int, CFErrorRef);
#endif
- virtual ~CertificateEncodingException() throw();
- virtual std::string ice_name() const;
+ virtual ~CertificateEncodingException() ICE_NOEXCEPT;
+ virtual std::string ice_id() const;
+#ifndef ICE_CPP11_MAPPING
virtual CertificateEncodingException* ice_clone() const;
+#endif
virtual void ice_throw() const;
std::string reason;
@@ -148,9 +152,11 @@ class ICE_SSL_API ParseException : public IceUtil::Exception
public:
ParseException(const char*, int, const std::string&);
- virtual ~ParseException() throw();
- virtual std::string ice_name() const;
+ virtual ~ParseException() ICE_NOEXCEPT;
+ virtual std::string ice_id() const;
+#ifndef ICE_CPP11_MAPPING
virtual ParseException* ice_clone() const;
+#endif
virtual void ice_throw() const;
std::string reason;
diff --git a/cpp/include/IceUtil/CtrlCHandler.h b/cpp/include/IceUtil/CtrlCHandler.h
index b44a0128f3f..492381fc4ef 100644
--- a/cpp/include/IceUtil/CtrlCHandler.h
+++ b/cpp/include/IceUtil/CtrlCHandler.h
@@ -60,8 +60,10 @@ class ICE_UTIL_API CtrlCHandlerException : public Exception
public:
CtrlCHandlerException(const char*, int);
- virtual std::string ice_name() const;
+ virtual std::string ice_id() const;
+#ifndef ICE_CPP11_MAPPING
virtual CtrlCHandlerException* ice_clone() const;
+#endif
virtual void ice_throw() const;
};
diff --git a/cpp/include/IceUtil/Exception.h b/cpp/include/IceUtil/Exception.h
index 730c0958d9b..87dc6a0aa96 100644
--- a/cpp/include/IceUtil/Exception.h
+++ b/cpp/include/IceUtil/Exception.h
@@ -33,7 +33,7 @@ public:
std::exception_ptr ice_clone() const;
#else
ICE_DEPRECATED_API("ice_name() is deprecated, use ice_id() instead.")
- virtual std::string ice_name() const;
+ std::string ice_name() const;
virtual Exception* ice_clone() const;
#endif
virtual void ice_throw() const;
@@ -60,8 +60,6 @@ public:
virtual ~NullHandleException() ICE_NOEXCEPT;
virtual std::string ice_id() const;
#ifndef ICE_CPP11_MAPPING
- ICE_DEPRECATED_API("ice_name() is deprecated, use ice_id() instead.")
- virtual std::string ice_name() const;
virtual NullHandleException* ice_clone() const;
#endif
virtual void ice_throw() const;
@@ -77,8 +75,6 @@ public:
virtual std::string ice_id() const;
virtual void ice_print(std::ostream&) const;
#ifndef ICE_CPP11_MAPPING
- ICE_DEPRECATED_API("ice_name() is deprecated, use ice_id() instead.")
- virtual std::string ice_name() const;
virtual IllegalArgumentException* ice_clone() const;
#endif
virtual void ice_throw() const;
@@ -103,8 +99,6 @@ public:
virtual std::string ice_id() const;
virtual void ice_print(std::ostream&) const;
#ifndef ICE_CPP11_MAPPING
- ICE_DEPRECATED_API("ice_name() is deprecated, use ice_id() instead.")
- virtual std::string ice_name() const;
virtual IllegalConversionException* ice_clone() const;
#endif
virtual void ice_throw() const;
@@ -124,8 +118,6 @@ public:
virtual std::string ice_id() const;
virtual void ice_print(std::ostream&) const;
#ifndef ICE_CPP11_MAPPING
- ICE_DEPRECATED_API("ice_name() is deprecated, use ice_id() instead.")
- virtual std::string ice_name() const;
virtual SyscallException* ice_clone() const;
#endif
virtual void ice_throw() const;
@@ -146,8 +138,6 @@ public:
virtual std::string ice_id() const;
virtual void ice_print(std::ostream&) const;
#ifndef ICE_CPP11_MAPPING
- ICE_DEPRECATED_API("ice_name() is deprecated, use ice_id() instead.")
- virtual std::string ice_name() const;
virtual FileLockException* ice_clone() const;
#endif
virtual void ice_throw() const;
@@ -169,8 +159,6 @@ public:
virtual ~OptionalNotSetException() ICE_NOEXCEPT;
virtual std::string ice_id() const;
#ifndef ICE_CPP11_MAPPING
- ICE_DEPRECATED_API("ice_name() is deprecated, use ice_id() instead.")
- virtual std::string ice_name() const;
virtual OptionalNotSetException* ice_clone() const;
#endif
virtual void ice_throw() const;
@@ -186,8 +174,6 @@ public:
virtual std::string ice_id() const;
virtual void ice_print(std::ostream&) const;
#ifndef ICE_CPP11_MAPPING
- ICE_DEPRECATED_API("ice_name() is deprecated, use ice_id() instead.")
- virtual std::string ice_name() const;
virtual IconvInitializationException* ice_clone() const;
#endif
virtual void ice_throw() const;
diff --git a/cpp/include/IceUtil/Options.h b/cpp/include/IceUtil/Options.h
index f193fa47168..fa56497038f 100644
--- a/cpp/include/IceUtil/Options.h
+++ b/cpp/include/IceUtil/Options.h
@@ -27,17 +27,15 @@ class ICE_UTIL_API APIException : public IceUtil::Exception
public:
APIException(const char*, int, const ::std::string&);
- virtual ~APIException() throw();
- virtual ::std::string ice_name() const;
+ virtual ~APIException() ICE_NOEXCEPT;
+ virtual ::std::string ice_id() const;
virtual void ice_print(std::ostream&) const;
+#ifndef ICE_CPP11_MAPPING
virtual APIException* ice_clone() const;
+#endif
virtual void ice_throw() const;
::std::string reason;
-
-private:
-
- static const char* _name;
};
ICE_UTIL_API ::std::ostream& operator<<(::std::ostream&, const APIException&);
@@ -47,17 +45,15 @@ class ICE_UTIL_API BadOptException : public IceUtil::Exception
public:
BadOptException(const char*, int, const ::std::string&);
- virtual ~BadOptException() throw();
- virtual ::std::string ice_name() const;
+ virtual ~BadOptException() ICE_NOEXCEPT;
+ virtual ::std::string ice_id() const;
virtual void ice_print(std::ostream&) const;
+#ifndef ICE_CPP11_MAPPING
virtual BadOptException* ice_clone() const;
+#endif
virtual void ice_throw() const;
::std::string reason;
-
-private:
-
- static const char* _name;
};
ICE_UTIL_API ::std::ostream& operator<<(::std::ostream&, const BadOptException&);
diff --git a/cpp/include/IceUtil/ThreadException.h b/cpp/include/IceUtil/ThreadException.h
index ebb827675c2..00af36c0b0d 100644
--- a/cpp/include/IceUtil/ThreadException.h
+++ b/cpp/include/IceUtil/ThreadException.h
@@ -21,13 +21,11 @@ class ICE_UTIL_API ThreadSyscallException : public SyscallException
public:
ThreadSyscallException(const char*, int, int);
- virtual std::string ice_name() const;
+ virtual std::string ice_id() const;
+#ifndef ICE_CPP11_MAPPING
virtual ThreadSyscallException* ice_clone() const;
+#endif
virtual void ice_throw() const;
-
-private:
-
- static const char* _name;
};
class ICE_UTIL_API ThreadLockedException : public Exception
@@ -35,13 +33,11 @@ class ICE_UTIL_API ThreadLockedException : public Exception
public:
ThreadLockedException(const char*, int);
- virtual std::string ice_name() const;
+ virtual std::string ice_id() const;
+#ifndef ICE_CPP11_MAPPING
virtual ThreadLockedException* ice_clone() const;
+#endif
virtual void ice_throw() const;
-
-private:
-
- static const char* _name;
};
class ICE_UTIL_API ThreadStartedException : public Exception
@@ -49,13 +45,11 @@ class ICE_UTIL_API ThreadStartedException : public Exception
public:
ThreadStartedException(const char*, int);
- virtual std::string ice_name() const;
+ virtual std::string ice_id() const;
+#ifndef ICE_CPP11_MAPPING
virtual ThreadStartedException* ice_clone() const;
+#endif
virtual void ice_throw() const;
-
-private:
-
- static const char* _name;
};
class ICE_UTIL_API ThreadNotStartedException : public Exception
@@ -63,13 +57,11 @@ class ICE_UTIL_API ThreadNotStartedException : public Exception
public:
ThreadNotStartedException(const char*, int);
- virtual std::string ice_name() const;
+ virtual std::string ice_id() const;
+#ifndef ICE_CPP11_MAPPING
virtual ThreadNotStartedException* ice_clone() const;
+#endif
virtual void ice_throw() const;
-
-private:
-
- static const char* _name;
};
class ICE_UTIL_API BadThreadControlException : public Exception
@@ -77,13 +69,11 @@ class ICE_UTIL_API BadThreadControlException : public Exception
public:
BadThreadControlException(const char*, int);
- virtual std::string ice_name() const;
+ virtual std::string ice_id() const;
+#ifndef ICE_CPP11_MAPPING
virtual BadThreadControlException* ice_clone() const;
+#endif
virtual void ice_throw() const;
-
-private:
-
- static const char* _name;
};
class ICE_UTIL_API InvalidTimeoutException : public Exception
@@ -91,15 +81,16 @@ class ICE_UTIL_API InvalidTimeoutException : public Exception
public:
InvalidTimeoutException(const char*, int, const Time&);
- virtual std::string ice_name() const;
+ virtual std::string ice_id() const;
virtual void ice_print(std::ostream&) const;
+#ifndef ICE_CPP11_MAPPING
virtual InvalidTimeoutException* ice_clone() const;
+#endif
virtual void ice_throw() const;
private:
-
+
Time _timeout;
- static const char* _name;
};
}
diff --git a/cpp/include/IceXML/Parser.h b/cpp/include/IceXML/Parser.h
index b68bd9ed918..0be03456614 100644
--- a/cpp/include/IceXML/Parser.h
+++ b/cpp/include/IceXML/Parser.h
@@ -54,11 +54,13 @@ public:
ParserException(const std::string&);
ParserException(const char*, int, const std::string&);
- virtual ~ParserException() throw();
+ virtual ~ParserException() ICE_NOEXCEPT;
- virtual std::string ice_name() const;
+ virtual std::string ice_id() const;
virtual void ice_print(std::ostream&) const;
+#ifndef ICE_CPP11_MAPPING
virtual ParserException* ice_clone() const;
+#endif
virtual void ice_throw() const;
std::string reason() const;
diff --git a/cpp/include/Slice/FileTracker.h b/cpp/include/Slice/FileTracker.h
index 07ed0b71ce7..b84bd766ae7 100644
--- a/cpp/include/Slice/FileTracker.h
+++ b/cpp/include/Slice/FileTracker.h
@@ -21,10 +21,12 @@ class SLICE_API FileException : public ::IceUtil::Exception
public:
FileException(const char*, int, const std::string&);
- ~FileException() throw();
- virtual std::string ice_name() const;
+ ~FileException() ICE_NOEXCEPT;
+ virtual std::string ice_id() const;
virtual void ice_print(std::ostream&) const;
+#ifndef ICE_CPP11_MAPPING
virtual FileException* ice_clone() const;
+#endif
virtual void ice_throw() const;
std::string reason() const;
diff --git a/cpp/src/Glacier2Lib/Application.cpp b/cpp/src/Glacier2Lib/Application.cpp
index b8edf35c07c..85b092978cf 100644
--- a/cpp/src/Glacier2Lib/Application.cpp
+++ b/cpp/src/Glacier2Lib/Application.cpp
@@ -45,16 +45,18 @@ private:
}
string
-Glacier2::RestartSessionException::ice_name() const
+Glacier2::RestartSessionException::ice_id() const
{
- return "RestartSessionException";
+ return "::Glacier2::RestartSessionException";
}
+#ifndef ICE_CPP11_MAPPING
Glacier2::RestartSessionException*
Glacier2::RestartSessionException::ice_clone() const
{
return new RestartSessionException(*this);
}
+#endif
void
Glacier2::RestartSessionException::ice_throw() const
diff --git a/cpp/src/Ice/Exception.cpp b/cpp/src/Ice/Exception.cpp
index 8377c6c2230..7114d693664 100644
--- a/cpp/src/Ice/Exception.cpp
+++ b/cpp/src/Ice/Exception.cpp
@@ -129,7 +129,7 @@ Ice::LocalException::LocalException(const char* file, int line) :
{
}
-Ice::LocalException::~LocalException() throw()
+Ice::LocalException::~LocalException() ICE_NOEXCEPT
{
}
@@ -138,7 +138,7 @@ Ice::SystemException::SystemException(const char* file, int line) :
{
}
-Ice::SystemException::~SystemException() throw()
+Ice::SystemException::~SystemException() ICE_NOEXCEPT
{
}
diff --git a/cpp/src/IceDB/IceDB.cpp b/cpp/src/IceDB/IceDB.cpp
index a679baa8819..48891521f5e 100644
--- a/cpp/src/IceDB/IceDB.cpp
+++ b/cpp/src/IceDB/IceDB.cpp
@@ -15,22 +15,20 @@
using namespace IceDB;
using namespace std;
-const char* IceDB::LMDBException::_name = "IceDB::LMDBException";
-
LMDBException::LMDBException(const char* file, int line, int err) :
IceUtil::Exception(file, line),
_error(err)
{
}
-LMDBException::~LMDBException() throw()
+LMDBException::~LMDBException() ICE_NOEXCEPT
{
}
string
-LMDBException::ice_name() const
+LMDBException::ice_id() const
{
- return _name;
+ return "::IceDB::LMDBException";
}
void
@@ -40,11 +38,13 @@ LMDBException::ice_print(ostream& out) const
out << ": " << mdb_strerror(_error);
}
+#ifndef ICE_CPP11_MAPPING
LMDBException*
LMDBException::ice_clone() const
{
return new LMDBException(*this);
}
+#endif
void
LMDBException::ice_throw() const
@@ -58,22 +58,20 @@ LMDBException::error() const
return _error;
}
-const char* IceDB::KeyTooLongException::_name = "IceDB::KeyTooLongException";
-
KeyTooLongException::KeyTooLongException(const char* file, int line, size_t size) :
IceUtil::Exception(file, line),
_size(size)
{
}
-KeyTooLongException::~KeyTooLongException() throw()
+KeyTooLongException::~KeyTooLongException() ICE_NOEXCEPT
{
}
string
-KeyTooLongException::ice_name() const
+KeyTooLongException::ice_id() const
{
- return _name;
+ return "::IceDB::KeyTooLongException";
}
void
@@ -88,11 +86,13 @@ KeyTooLongException::ice_print(ostream& out) const
out << "Max size = " << maxKeySize;
}
+#ifndef ICE_CPP11_MAPPING
KeyTooLongException*
KeyTooLongException::ice_clone() const
{
return new KeyTooLongException(*this);
}
+#endif
void
KeyTooLongException::ice_throw() const
@@ -100,22 +100,20 @@ KeyTooLongException::ice_throw() const
throw *this;
}
-const char* IceDB::BadEnvException::_name = "IceDB::BadEnvException";
-
BadEnvException::BadEnvException(const char* file, int line, size_t size) :
IceUtil::Exception(file, line),
_size(size)
{
}
-BadEnvException::~BadEnvException() throw()
+BadEnvException::~BadEnvException() ICE_NOEXCEPT
{
}
string
-BadEnvException::ice_name() const
+BadEnvException::ice_id() const
{
- return _name;
+ return "::IceDB::BadEnvException";
}
void
@@ -126,11 +124,13 @@ BadEnvException::ice_print(ostream& out) const
out << ", IceDB max key size = " << maxKeySize;
}
+#ifndef ICE_CPP11_MAPPING
BadEnvException*
BadEnvException::ice_clone() const
{
return new BadEnvException(*this);
}
+#endif
void
BadEnvException::ice_throw() const
diff --git a/cpp/src/IceDB/IceDB.h b/cpp/src/IceDB/IceDB.h
index 56a36f9249d..16a60a4afee 100644
--- a/cpp/src/IceDB/IceDB.h
+++ b/cpp/src/IceDB/IceDB.h
@@ -58,11 +58,13 @@ class ICE_DB_API LMDBException : public IceUtil::Exception
public:
LMDBException(const char*, int, int);
- virtual ~LMDBException() throw();
+ virtual ~LMDBException() ICE_NOEXCEPT;
- virtual std::string ice_name() const;
+ virtual std::string ice_id() const;
virtual void ice_print(std::ostream&) const;
+#ifndef ICE_CPP11_MAPPING
virtual LMDBException* ice_clone() const;
+#endif
virtual void ice_throw() const;
int error() const;
@@ -82,11 +84,13 @@ class ICE_DB_API KeyTooLongException : public IceUtil::Exception
public:
KeyTooLongException(const char*, int, size_t);
- virtual ~KeyTooLongException() throw();
+ virtual ~KeyTooLongException() ICE_NOEXCEPT;
- virtual std::string ice_name() const;
+ virtual std::string ice_id() const;
virtual void ice_print(std::ostream&) const;
+#ifndef ICE_CPP11_MAPPING
virtual KeyTooLongException* ice_clone() const;
+#endif
virtual void ice_throw() const;
private:
@@ -104,11 +108,13 @@ class ICE_DB_API BadEnvException : public IceUtil::Exception
public:
BadEnvException(const char*, int, size_t);
- virtual ~BadEnvException() throw();
+ virtual ~BadEnvException() ICE_NOEXCEPT;
- virtual std::string ice_name() const;
+ virtual std::string ice_id() const;
virtual void ice_print(std::ostream&) const;
+#ifndef ICE_CPP11_MAPPING
virtual BadEnvException* ice_clone() const;
+#endif
virtual void ice_throw() const;
private:
diff --git a/cpp/src/IceSSL/Certificate.cpp b/cpp/src/IceSSL/Certificate.cpp
index ee814eb420f..6ddde411ddb 100644
--- a/cpp/src/IceSSL/Certificate.cpp
+++ b/cpp/src/IceSSL/Certificate.cpp
@@ -47,8 +47,6 @@ using namespace std;
using namespace Ice;
using namespace IceSSL;
-const char* IceSSL::CertificateReadException::_name = "IceSSL::CertificateReadException";
-
#if defined(ICE_USE_SECURE_TRANSPORT) || defined(ICE_USE_SCHANNEL)
//
// Map a certificate OID to its alias
@@ -429,21 +427,23 @@ CertificateReadException::CertificateReadException(const char* file, int line, c
{
}
-CertificateReadException::~CertificateReadException() throw()
+CertificateReadException::~CertificateReadException() ICE_NOEXCEPT
{
}
string
-CertificateReadException::ice_name() const
+CertificateReadException::ice_id() const
{
- return _name;
+ return "::IceSSL::CertificateReadException";
}
+#ifndef ICE_CPP11_MAPPING
CertificateReadException*
CertificateReadException::ice_clone() const
{
return new CertificateReadException(*this);
}
+#endif
void
CertificateReadException::ice_throw() const
@@ -451,8 +451,6 @@ CertificateReadException::ice_throw() const
throw *this;
}
-const char* IceSSL::CertificateEncodingException::_name = "IceSSL::CertificateEncodingException";
-
#ifdef ICE_USE_SECURE_TRANSPORT
CertificateEncodingException::CertificateEncodingException(const char* file, int line, CFErrorRef err) :
Exception(file, line)
@@ -469,21 +467,23 @@ CertificateEncodingException::CertificateEncodingException(const char* file, int
{
}
-CertificateEncodingException::~CertificateEncodingException() throw()
+CertificateEncodingException::~CertificateEncodingException() ICE_NOEXCEPT
{
}
string
-CertificateEncodingException::ice_name() const
+CertificateEncodingException::ice_id() const
{
- return _name;
+ return "::IceSSL::CertificateEncodingException";
}
+#ifndef ICE_CPP11_MAPPING
CertificateEncodingException*
CertificateEncodingException::ice_clone() const
{
return new CertificateEncodingException(*this);
}
+#endif
void
CertificateEncodingException::ice_throw() const
@@ -663,29 +663,29 @@ convertGeneralNames(GENERAL_NAMES* gens)
}
#endif
-const char* ParseException::_name = "IceSSL::ParseException";
-
ParseException::ParseException(const char* file, int line, const string& r) :
Exception(file, line),
reason(r)
{
}
-ParseException::~ParseException() throw()
+ParseException::~ParseException() ICE_NOEXCEPT
{
}
string
-ParseException::ice_name() const
+ParseException::ice_id() const
{
- return _name;
+ return "::IceSSL::ParseException";
}
+#ifndef ICE_CPP11_MAPPING
ParseException*
ParseException::ice_clone() const
{
return new ParseException(*this);
}
+#endif
void
ParseException::ice_throw() const
diff --git a/cpp/src/IceStorm/Parser.cpp b/cpp/src/IceStorm/Parser.cpp
index ce7b7bf95bc..8957864f8dc 100644
--- a/cpp/src/IceStorm/Parser.cpp
+++ b/cpp/src/IceStorm/Parser.cpp
@@ -46,13 +46,14 @@ public:
}
virtual
- ~UnknownManagerException() throw()
+ ~UnknownManagerException() ICE_NOEXCEPT
{
}
+
virtual string
- ice_name() const
+ ice_id() const
{
- return "UnknownManagerException";
+ return "::UnknownManagerException";
}
virtual Exception*
@@ -334,7 +335,7 @@ Parser::replica(const list<string>& args)
}
catch(const Exception& ex)
{
- cout << p->id << ": " << ex.ice_name() << endl;
+ cout << p->id << ": " << ex.ice_id() << endl;
}
}
}
diff --git a/cpp/src/IceUtil/CtrlCHandler.cpp b/cpp/src/IceUtil/CtrlCHandler.cpp
index f21281f8a0d..3e0633172d6 100644
--- a/cpp/src/IceUtil/CtrlCHandler.cpp
+++ b/cpp/src/IceUtil/CtrlCHandler.cpp
@@ -55,24 +55,19 @@ CtrlCHandlerException::CtrlCHandlerException(const char* file, int line) :
{
}
-namespace
-{
-
-const char* ctrlCHandlerName = "IceUtil::CtrlCHandlerException";
-
-}
-
string
-CtrlCHandlerException::ice_name() const
+CtrlCHandlerException::ice_id() const
{
- return ctrlCHandlerName;
+ return "::IceUtil::CtrlCHandlerException";
}
+#ifndef ICE_CPP11_MAPPING
CtrlCHandlerException*
CtrlCHandlerException::ice_clone() const
{
return new CtrlCHandlerException(*this);
}
+#endif
void
CtrlCHandlerException::ice_throw() const
diff --git a/cpp/src/IceUtil/Exception.cpp b/cpp/src/IceUtil/Exception.cpp
index eab14ddffa1..46a6de3749e 100644
--- a/cpp/src/IceUtil/Exception.cpp
+++ b/cpp/src/IceUtil/Exception.cpp
@@ -468,7 +468,7 @@ IceUtil::Exception::ice_clone() const
string
IceUtil::Exception::ice_name() const
{
- return "IceUtil::Exception";
+ return ice_id().substr(2);
}
IceUtil::Exception*
@@ -529,12 +529,6 @@ IceUtil::NullHandleException::ice_id() const
}
#ifndef ICE_CPP11_MAPPING
-string
-IceUtil::NullHandleException::ice_name() const
-{
- return "IceUtil::NullHandleException";
-}
-
IceUtil::NullHandleException*
IceUtil::NullHandleException::ice_clone() const
{
@@ -577,12 +571,6 @@ IceUtil::IllegalArgumentException::ice_id() const
}
#ifndef ICE_CPP11_MAPPING
-string
-IceUtil::IllegalArgumentException::ice_name() const
-{
- return "IceUtil::IllegalArgumentException";
-}
-
IceUtil::IllegalArgumentException*
IceUtil::IllegalArgumentException::ice_clone() const
{
@@ -633,12 +621,6 @@ IceUtil::IllegalConversionException::ice_id() const
}
#ifndef ICE_CPP11_MAPPING
-string
-IceUtil::IllegalConversionException::ice_name() const
-{
- return "IceUtil::IllegalConversionException";
-}
-
IceUtil::IllegalConversionException*
IceUtil::IllegalConversionException::ice_clone() const
{
@@ -683,13 +665,6 @@ IceUtil::SyscallException::ice_id() const
}
#ifndef ICE_CPP11_MAPPING
-
-string
-IceUtil::SyscallException::ice_name() const
-{
- return "IceUtil::SyscallException";
-}
-
IceUtil::SyscallException*
IceUtil::SyscallException::ice_clone() const
{
@@ -739,12 +714,6 @@ IceUtil::FileLockException::ice_id() const
}
#ifndef ICE_CPP11_MAPPING
-string
-IceUtil::FileLockException::ice_name() const
-{
- return "IceUtil::FileLockException";
-}
-
IceUtil::FileLockException*
IceUtil::FileLockException::ice_clone() const
{
@@ -784,12 +753,6 @@ IceUtil::OptionalNotSetException::ice_id() const
}
#ifndef ICE_CPP11_MAPPING
-string
-IceUtil::OptionalNotSetException::ice_name() const
-{
- return "IceUtil::OptionalNotSetException";
-}
-
IceUtil::OptionalNotSetException*
IceUtil::OptionalNotSetException::ice_clone() const
{
@@ -828,12 +791,6 @@ IceUtil::IconvInitializationException::ice_id() const
}
#ifndef ICE_CPP11_MAPPING
-string
-IceUtil::IconvInitializationException::ice_name() const
-{
- return "IceUtil::IconvInitializationException";
-}
-
IceUtil::IconvInitializationException*
IceUtil::IconvInitializationException::ice_clone() const
{
diff --git a/cpp/src/IceUtil/Options.cpp b/cpp/src/IceUtil/Options.cpp
index a2201deed1f..309a5303a64 100644
--- a/cpp/src/IceUtil/Options.cpp
+++ b/cpp/src/IceUtil/Options.cpp
@@ -20,16 +20,14 @@ IceUtilInternal::APIException::APIException(const char* file, int line, const st
{
}
-IceUtilInternal::APIException::~APIException() throw()
+IceUtilInternal::APIException::~APIException() ICE_NOEXCEPT
{
}
-const char* IceUtilInternal::APIException::_name = "IceUtilInternal::APIException";
-
string
-IceUtilInternal::APIException::ice_name() const
+IceUtilInternal::APIException::ice_id() const
{
- return _name;
+ return "::IceUtilInternal::APIException";
}
void
@@ -42,11 +40,13 @@ IceUtilInternal::APIException::ice_print(ostream& out) const
}
}
+#ifndef ICE_CPP11_MAPPING
IceUtilInternal::APIException*
IceUtilInternal::APIException::ice_clone() const
{
return new APIException(*this);
}
+#endif
void
IceUtilInternal::APIException::ice_throw() const
@@ -66,16 +66,14 @@ IceUtilInternal::BadOptException::BadOptException(const char* file, int line, co
{
}
-IceUtilInternal::BadOptException::~BadOptException() throw()
+IceUtilInternal::BadOptException::~BadOptException() ICE_NOEXCEPT
{
}
-const char* IceUtilInternal::BadOptException::_name = "IceUtilInternal::BadOptException";
-
string
-IceUtilInternal::BadOptException::ice_name() const
+IceUtilInternal::BadOptException::ice_id() const
{
- return _name;
+ return "::IceUtilInternal::BadOptException";
}
void
@@ -88,11 +86,13 @@ IceUtilInternal::BadOptException::ice_print(ostream& out) const
}
}
+#ifndef ICE_CPP11_MAPPING
IceUtilInternal::BadOptException*
IceUtilInternal::BadOptException::ice_clone() const
{
return new BadOptException(*this);
}
+#endif
void
IceUtilInternal::BadOptException::ice_throw() const
diff --git a/cpp/src/IceUtil/ThreadException.cpp b/cpp/src/IceUtil/ThreadException.cpp
index 4ab221e8a03..8b1e1a450a2 100644
--- a/cpp/src/IceUtil/ThreadException.cpp
+++ b/cpp/src/IceUtil/ThreadException.cpp
@@ -15,20 +15,20 @@ IceUtil::ThreadSyscallException::ThreadSyscallException(const char* file, int li
SyscallException(file, line, err)
{
}
-
-const char* IceUtil::ThreadSyscallException::_name = "IceUtil::ThreadSyscallException";
string
-IceUtil::ThreadSyscallException::ice_name() const
+IceUtil::ThreadSyscallException::ice_id() const
{
- return _name;
+ return "::IceUtil::ThreadSyscallException";
}
+#ifndef ICE_CPP11_MAPPING
IceUtil::ThreadSyscallException*
IceUtil::ThreadSyscallException::ice_clone() const
{
return new ThreadSyscallException(*this);
}
+#endif
void
IceUtil::ThreadSyscallException::ice_throw() const
@@ -41,19 +41,19 @@ IceUtil::ThreadLockedException::ThreadLockedException(const char* file, int line
{
}
-const char* IceUtil::ThreadLockedException::_name = "IceUtil::ThreadLockedException";
-
string
-IceUtil::ThreadLockedException::ice_name() const
+IceUtil::ThreadLockedException::ice_id() const
{
- return _name;
+ return "::IceUtil::ThreadLockedException";
}
+#ifndef ICE_CPP11_MAPPING
IceUtil::ThreadLockedException*
IceUtil::ThreadLockedException::ice_clone() const
{
return new ThreadLockedException(*this);
}
+#endif
void
IceUtil::ThreadLockedException::ice_throw() const
@@ -66,19 +66,19 @@ IceUtil::ThreadStartedException::ThreadStartedException(const char* file, int li
{
}
-const char* IceUtil::ThreadStartedException::_name = "IceUtil::ThreadStartedException";
-
string
-IceUtil::ThreadStartedException::ice_name() const
+IceUtil::ThreadStartedException::ice_id() const
{
- return _name;
+ return "::IceUtil::ThreadStartedException";
}
+#ifndef ICE_CPP11_MAPPING
IceUtil::ThreadStartedException*
IceUtil::ThreadStartedException::ice_clone() const
{
return new ThreadStartedException(*this);
}
+#endif
void
IceUtil::ThreadStartedException::ice_throw() const
@@ -91,19 +91,19 @@ IceUtil::ThreadNotStartedException::ThreadNotStartedException(const char* file,
{
}
-const char* IceUtil::ThreadNotStartedException::_name = "IceUtil::ThreadNotStartedException";
-
string
-IceUtil::ThreadNotStartedException::ice_name() const
+IceUtil::ThreadNotStartedException::ice_id() const
{
- return _name;
+ return "::IceUtil::ThreadNotStartedException";
}
+#ifndef ICE_CPP11_MAPPING
IceUtil::ThreadNotStartedException*
IceUtil::ThreadNotStartedException::ice_clone() const
{
return new ThreadNotStartedException(*this);
}
+#endif
void
IceUtil::ThreadNotStartedException::ice_throw() const
@@ -117,19 +117,19 @@ IceUtil::BadThreadControlException::BadThreadControlException(const char* file,
{
}
-const char* IceUtil::BadThreadControlException::_name = "IceUtil::BadThreadControlException";
-
string
-IceUtil::BadThreadControlException::ice_name() const
+IceUtil::BadThreadControlException::ice_id() const
{
- return _name;
+ return "::IceUtil::BadThreadControlException";
}
+#ifndef ICE_CPP11_MAPPING
IceUtil::BadThreadControlException*
IceUtil::BadThreadControlException::ice_clone() const
{
return new BadThreadControlException(*this);
}
+#endif
void
IceUtil::BadThreadControlException::ice_throw() const
@@ -143,13 +143,11 @@ IceUtil::InvalidTimeoutException::InvalidTimeoutException(const char* file, int
_timeout(timeout)
{
}
-
-const char* IceUtil::InvalidTimeoutException::_name = "IceUtil::InvalidTimeoutException";
string
-IceUtil::InvalidTimeoutException::ice_name() const
+IceUtil::InvalidTimeoutException::ice_id() const
{
- return _name;
+ return "::IceUtil::InvalidTimeoutException";
}
void
@@ -159,11 +157,13 @@ IceUtil::InvalidTimeoutException::ice_print(ostream& os) const
os << ":\ninvalid timeout: " << _timeout << " seconds";
}
+#ifndef ICE_CPP11_MAPPING
IceUtil::InvalidTimeoutException*
IceUtil::InvalidTimeoutException::ice_clone() const
{
return new InvalidTimeoutException(*this);
}
+#endif
void
IceUtil::InvalidTimeoutException::ice_throw() const
diff --git a/cpp/src/IceXML/Parser.cpp b/cpp/src/IceXML/Parser.cpp
index 9a32636b47e..cdcf553a8c5 100644
--- a/cpp/src/IceXML/Parser.cpp
+++ b/cpp/src/IceXML/Parser.cpp
@@ -28,16 +28,14 @@ IceXML::ParserException::ParserException(const char* file, int line, const strin
{
}
-IceXML::ParserException::~ParserException() throw()
+IceXML::ParserException::~ParserException() ICE_NOEXCEPT
{
}
-const char* IceXML::ParserException::_name = "IceXML::ParserException";
-
string
-IceXML::ParserException::ice_name() const
+IceXML::ParserException::ice_id() const
{
- return _name;
+ return "::IceXML::ParserException";
}
void
@@ -54,11 +52,13 @@ IceXML::ParserException::ice_print(std::ostream& out) const
}
}
+#ifndef ICE_CPP11_MAPPING
IceXML::ParserException*
IceXML::ParserException::ice_clone() const
{
return new ParserException(*this);
}
+#endif
void
IceXML::ParserException::ice_throw() const
diff --git a/cpp/src/Slice/FileTracker.cpp b/cpp/src/Slice/FileTracker.cpp
index fcf5060af5b..9b9149970e4 100644
--- a/cpp/src/Slice/FileTracker.cpp
+++ b/cpp/src/Slice/FileTracker.cpp
@@ -23,16 +23,14 @@ Slice::FileException::FileException(const char* file, int line, const string& r)
{
}
-Slice::FileException::~FileException() throw()
+Slice::FileException::~FileException() ICE_NOEXCEPT
{
}
-const char* Slice::FileException::_name = "Slice::FileException";
-
string
-Slice::FileException::ice_name() const
+Slice::FileException::ice_id() const
{
- return _name;
+ return "::Slice::FileException";
}
void
@@ -42,11 +40,13 @@ Slice::FileException::ice_print(ostream& out) const
out << ": " << _reason;
}
+#ifndef ICE_CPP11_MAPPING
Slice::FileException*
Slice::FileException::ice_clone() const
{
return new FileException(*this);
}
+#endif
void
Slice::FileException::ice_throw() const
diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp
index f5aa79cd100..f28a565a53c 100644
--- a/cpp/src/Slice/PythonUtil.cpp
+++ b/cpp/src/Slice/PythonUtil.cpp
@@ -1084,11 +1084,6 @@ Slice::Python::CodeVisitor::visitExceptionStart(const ExceptionPtr& p)
_out << nl << "return IcePy.stringifyException(self)";
_out.dec();
_out << sp << nl << "__repr__ = __str__";
-
- //
- // _ice_name
- //
- _out << sp << nl << "_ice_name = '" << scoped.substr(2) << "'";
//
// _ice_id
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index bdc5e986be7..c496fec26e4 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -982,13 +982,6 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
C << scoped.substr(2) << "::~" << name << "() throw()";
C << sb;
C << eb;
-
- H << nl << "ICE_DEPRECATED_API(\"ice_name() is deprecated, use ice_id() instead.\")";
- H << nl << "virtual ::std::string ice_name() const;";
- C << sp << nl << "::std::string" << nl << scoped.substr(2) << "::ice_name() const";
- C << sb;
- C << nl << "return \"" << p->scoped().substr(2) << "\";";
- C << eb;
H << nl << "virtual ::std::string ice_id() const;";
C << sp << nl << "::std::string" << nl << scoped.substr(2) << "::ice_id() const";
diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp
index 7c00c5afff0..cc588231114 100644
--- a/cpp/src/slice2cs/Gen.cpp
+++ b/cpp/src/slice2cs/Gen.cpp
@@ -3708,14 +3708,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
_out << sp << nl << "#endregion"; // Constructors
- _out << sp;
- emitGeneratedCodeAttribute();
- _out << nl << "[_System.Obsolete(\"ice_name() is deprecated, use ice_id() instead.\")]";
- _out << nl << "public override string ice_name()";
- _out << sb;
- _out << nl << "return \"" << p->scoped().substr(2) << "\";";
- _out << eb;
-
+ _out << sp;
emitGeneratedCodeAttribute();
_out << nl << "public override string ice_id()";
_out << sb;
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index e9da95c087c..8df6121d117 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -3653,16 +3653,6 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
}
}
- out << sp;
- out << nl << "/**";
- out << nl << " * @deprecated ice_name() is deprecated, use ice_id() instead.";
- out << nl << " **/";
- out << nl << "@Deprecated";
- out << nl << "public String" << nl << "ice_name()";
- out << sb;
- out << nl << "return \"" << scoped.substr(2) << "\";";
- out << eb;
-
out << sp << nl << "public String" << nl << "ice_id()";
out << sb;
out << nl << "return \"" << scoped << "\";";
diff --git a/cpp/src/slice2objc/Gen.cpp b/cpp/src/slice2objc/Gen.cpp
index 6455d87a4ce..361a8924b46 100644
--- a/cpp/src/slice2objc/Gen.cpp
+++ b/cpp/src/slice2objc/Gen.cpp
@@ -1283,15 +1283,6 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
}
//
- // ice_name
- //
- _H << nl << "-(NSString *) ice_name;";
- _M << sp << nl << "-(NSString *) ice_name";
- _M << sb;
- _M << nl << "return @\"" << p->scoped().substr(2) << "\";";
- _M << eb;
-
- //
// ice_id
//
_H << nl << "-(NSString *) ice_id;";
diff --git a/cpp/src/slice2php/Main.cpp b/cpp/src/slice2php/Main.cpp
index 2e42bc8fb73..4163fc193c6 100644
--- a/cpp/src/slice2php/Main.cpp
+++ b/cpp/src/slice2php/Main.cpp
@@ -684,16 +684,7 @@ CodeVisitor::visitExceptionStart(const ExceptionPtr& p)
_out << eb;
//
- // ice_name
- //
- _out << sp << nl << "public function ice_name()";
- _out << sb;
- _out << nl << "trigger_error('ice_name() is deprecated use ice_id() instead.', E_DEPRECATED);";
- _out << nl << "return '" << scoped.substr(2) << "';";
- _out << eb;
-
- //
- // ice_name
+ // ice_id
//
_out << sp << nl << "public function ice_id()";
_out << sb;
diff --git a/cpp/test/Ice/interceptor/MyObjectI.cpp b/cpp/test/Ice/interceptor/MyObjectI.cpp
index 0ebb06cdd17..72c64aba5fb 100644
--- a/cpp/test/Ice/interceptor/MyObjectI.cpp
+++ b/cpp/test/Ice/interceptor/MyObjectI.cpp
@@ -20,27 +20,23 @@ MySystemException::MySystemException(const char* file, int line) :
{
}
-MySystemException::~MySystemException() throw()
+MySystemException::~MySystemException() ICE_NOEXCEPT
{
}
string
MySystemException::ice_id() const
{
- return "MySystemException";
-}
-
-string
-MySystemException::ice_name() const
-{
- return ice_id();
+ return "::MySystemException";
}
+#ifndef ICE_CPP11_MAPPING
MySystemException*
MySystemException::ice_clone() const
{
return new MySystemException(*this);
}
+#endif
void
MySystemException::ice_throw() const
diff --git a/cpp/test/Ice/interceptor/MyObjectI.h b/cpp/test/Ice/interceptor/MyObjectI.h
index 9ba0c9f3e37..b7a61435a81 100644
--- a/cpp/test/Ice/interceptor/MyObjectI.h
+++ b/cpp/test/Ice/interceptor/MyObjectI.h
@@ -18,11 +18,12 @@ public:
MySystemException(const char*, int);
- virtual ~MySystemException() throw();
+ virtual ~MySystemException() ICE_NOEXCEPT;
- virtual std::string ice_name() const;
virtual std::string ice_id() const;
+#ifndef ICE_CPP11_MAPPING
virtual MySystemException* ice_clone() const;
+#endif
virtual void ice_throw() const;
};
diff --git a/cpp/test/Ice/plugin/Plugin.cpp b/cpp/test/Ice/plugin/Plugin.cpp
index 8e4c23d8ffd..0e5e60b2e21 100644
--- a/cpp/test/Ice/plugin/Plugin.cpp
+++ b/cpp/test/Ice/plugin/Plugin.cpp
@@ -58,9 +58,9 @@ class PluginInitializeFailExeption : public std::exception
public:
- PluginInitializeFailExeption() throw() {}
- virtual ~PluginInitializeFailExeption() throw() {}
- virtual const char* what() const throw() { return "PluginInitializeFailExeption"; }
+ PluginInitializeFailExeption() ICE_NOEXCEPT {}
+ virtual ~PluginInitializeFailExeption() ICE_NOEXCEPT {}
+ virtual const char* what() const ICE_NOEXCEPT { return "PluginInitializeFailExeption"; }
};
class PluginInitializeFail : public Ice::Plugin
diff --git a/cpp/test/Ice/retry/SystemFailure.h b/cpp/test/Ice/retry/SystemFailure.h
index a58c3d7b1b4..4ef97f37ffa 100644
--- a/cpp/test/Ice/retry/SystemFailure.h
+++ b/cpp/test/Ice/retry/SystemFailure.h
@@ -23,21 +23,18 @@ public:
SystemFailure(const SystemFailure& ex) : Ice::SystemException(ex.ice_file(), ex.ice_line())
{
}
-
- virtual std::string ice_name() const
- {
- return ice_id();
- }
virtual std::string ice_id() const
{
return "SystemFailure";
}
+#ifndef ICE_CPP11_MAPPING
virtual SystemException* ice_clone() const
{
return new SystemFailure(*this);
}
+#endif
virtual void ice_throw() const
{
diff --git a/cpp/test/include/TestCommon.h b/cpp/test/include/TestCommon.h
index 322672478ac..cad96b6bc41 100644
--- a/cpp/test/include/TestCommon.h
+++ b/cpp/test/include/TestCommon.h
@@ -144,19 +144,21 @@ public:
{
}
- virtual ~TestFailedException() throw()
+ virtual ~TestFailedException() ICE_NOEXCEPT
{
}
- virtual ::std::string ice_name() const
+ virtual ::std::string ice_id() const
{
return "::TestFailedException";
}
+#ifndef ICE_CPP11_MAPPING
virtual TestFailedException* ice_clone() const
{
return new TestFailedException(*this);
}
+#endif
virtual void ice_throw() const
{
diff --git a/csharp/src/Ice/Exception.cs b/csharp/src/Ice/Exception.cs
index ed7d23cf69b..1bcec9271cf 100644
--- a/csharp/src/Ice/Exception.cs
+++ b/csharp/src/Ice/Exception.cs
@@ -76,7 +76,10 @@ namespace Ice
/// </summary>
/// <returns>The name of this exception.</returns>
[System.Obsolete("ice_name() is deprecated, use ice_id() instead.")]
- public abstract string ice_name();
+ public string ice_name()
+ {
+ return ice_id().Substring(2);
+ }
/// <summary>
/// Returns the type id of this exception.
diff --git a/csharp/src/IceSSL/RFC2253.cs b/csharp/src/IceSSL/RFC2253.cs
index 117ece7c955..6daf0d150ce 100644
--- a/csharp/src/IceSSL/RFC2253.cs
+++ b/csharp/src/IceSSL/RFC2253.cs
@@ -32,9 +32,9 @@ namespace IceSSL
}
internal string
- ice_name()
+ ice_id()
{
- return "RFC2253::ParseException";
+ return "::RFC2253::ParseException";
}
internal string reason;
diff --git a/csharp/test/Ice/interceptor/MyObjectI.cs b/csharp/test/Ice/interceptor/MyObjectI.cs
index 21ba8884f3e..065d2ef3a45 100644
--- a/csharp/test/Ice/interceptor/MyObjectI.cs
+++ b/csharp/test/Ice/interceptor/MyObjectI.cs
@@ -16,18 +16,11 @@ class MySystemException : Ice.SystemException
MySystemException()
{
}
-
- [System.Obsolete("ice_name() is deprecated, use ice_id() instead.")]
- override public string
- ice_name()
- {
- return "MySystemException";
- }
override public string
ice_id()
{
- return "MySystemException";
+ return "::MySystemException";
}
};
diff --git a/csharp/test/Ice/retry/SystemFailure.cs b/csharp/test/Ice/retry/SystemFailure.cs
index 13406b30109..6a3da088fd5 100644
--- a/csharp/test/Ice/retry/SystemFailure.cs
+++ b/csharp/test/Ice/retry/SystemFailure.cs
@@ -10,17 +10,10 @@
using System;
public class SystemFailure : Ice.SystemException
-{
- [System.Obsolete("ice_name() is deprecated, use ice_id() instead.")]
- public override string
- ice_name()
- {
- return "SystemFailure";
- }
-
+{
public override string
ice_id()
{
- return "SystemFailure";
+ return "::SystemFailure";
}
};
diff --git a/java/src/Ice/src/main/java/Ice/Exception.java b/java/src/Ice/src/main/java/Ice/Exception.java
index dd8bf25281d..5cafdc6d592 100644
--- a/java/src/Ice/src/main/java/Ice/Exception.java
+++ b/java/src/Ice/src/main/java/Ice/Exception.java
@@ -55,8 +55,11 @@ public abstract class Exception extends RuntimeException implements Cloneable
* @deprecated ice_name() is deprecated, use ice_id() instead.
**/
@Deprecated
- public abstract String
- ice_name();
+ public String
+ ice_name()
+ {
+ return ice_id().substring(2);
+ }
/**
* Returns the type id of this exception.
diff --git a/java/src/Ice/src/main/java/Ice/UserException.java b/java/src/Ice/src/main/java/Ice/UserException.java
index 7b606d53584..8faaf9b7aaf 100644
--- a/java/src/Ice/src/main/java/Ice/UserException.java
+++ b/java/src/Ice/src/main/java/Ice/UserException.java
@@ -52,8 +52,11 @@ public abstract class UserException extends java.lang.Exception implements Clone
* @deprecated ice_name() is deprecated, use ice_id() instead.
**/
@Deprecated
- public abstract String
- ice_name();
+ public String
+ ice_name()
+ {
+ return ice_id().substring(2);
+ }
/**
* Returns the type id of this exception.
diff --git a/java/src/Ice/src/main/java/IceSSL/RFC2253.java b/java/src/Ice/src/main/java/IceSSL/RFC2253.java
index 28fa526cf9e..e7f2b353b83 100644
--- a/java/src/Ice/src/main/java/IceSSL/RFC2253.java
+++ b/java/src/Ice/src/main/java/IceSSL/RFC2253.java
@@ -31,13 +31,6 @@ class RFC2253
{
return "::RFC2253::ParseException";
}
-
- @Override
- public String
- ice_name()
- {
- return "RFC2253::ParseException";
- }
public String reason;
}
diff --git a/java/test/src/main/java/test/Ice/interceptor/MySystemException.java b/java/test/src/main/java/test/Ice/interceptor/MySystemException.java
index 4d3803dc0d7..fada8e44eb3 100644
--- a/java/test/src/main/java/test/Ice/interceptor/MySystemException.java
+++ b/java/test/src/main/java/test/Ice/interceptor/MySystemException.java
@@ -20,13 +20,6 @@ public class MySystemException extends Ice.SystemException
public String
ice_id()
{
- return "MySystemException";
- }
-
- @Override
- public String
- ice_name()
- {
- return "MySystemException";
+ return "::MySystemException";
}
}
diff --git a/java/test/src/main/java/test/Ice/retry/SystemFailure.java b/java/test/src/main/java/test/Ice/retry/SystemFailure.java
index 6dafb6fab73..df84db39c85 100644
--- a/java/test/src/main/java/test/Ice/retry/SystemFailure.java
+++ b/java/test/src/main/java/test/Ice/retry/SystemFailure.java
@@ -15,13 +15,6 @@ class SystemFailure extends Ice.SystemException
public String
ice_id()
{
- return "SystemFailure";
- }
-
- @Override
- public String
- ice_name()
- {
- return "SystemFailure";
+ return "::SystemFailure";
}
};
diff --git a/objective-c/src/Ice/Exception.mm b/objective-c/src/Ice/Exception.mm
index 79ef4602796..422c0b2ae1d 100644
--- a/objective-c/src/Ice/Exception.mm
+++ b/objective-c/src/Ice/Exception.mm
@@ -31,8 +31,7 @@
-(NSString*)ice_name
{
- NSAssert(false, @"ice_name not overriden");
- return nil;
+ return [[self ice_id] substringFromIndex:2];
}
-(NSString*)ice_id
diff --git a/objective-c/src/Ice/ObjectAdapterI.mm b/objective-c/src/Ice/ObjectAdapterI.mm
index 6c5be6f3901..8038bdd4f7b 100644
--- a/objective-c/src/Ice/ObjectAdapterI.mm
+++ b/objective-c/src/Ice/ObjectAdapterI.mm
@@ -122,13 +122,6 @@ public:
return [[_ex ice_id] UTF8String];
}
- ICE_DEPRECATED_API("ice_name() is deprecated, use ice_id() instead.")
- std::string
- ice_name() const
- {
- return ice_id();
- }
-
Ice::UserException*
ice_clone() const
{
diff --git a/objective-c/src/Ice/Stream.mm b/objective-c/src/Ice/Stream.mm
index 278e4657fe9..9654fea4cc7 100644
--- a/objective-c/src/Ice/Stream.mm
+++ b/objective-c/src/Ice/Stream.mm
@@ -287,13 +287,6 @@ public:
return [[_ex ice_id] UTF8String];
}
- ICE_DEPRECATED_API("ice_name() is deprecated, use ice_id() instead.")
- virtual std::string
- ice_name() const
- {
- return ice_id();
- }
-
virtual Ice::UserException*
ice_clone() const
{
@@ -341,13 +334,6 @@ public:
return [[_ex ice_id] UTF8String];
}
- ICE_DEPRECATED_API("ice_name() is deprecated, use ice_id() instead.")
- virtual std::string
- ice_name() const
- {
- return ice_id();
- }
-
virtual bool
usesClasses() const
{
diff --git a/objective-c/src/Ice/Util.h b/objective-c/src/Ice/Util.h
index a13ee069482..9ff2d6c5494 100644
--- a/objective-c/src/Ice/Util.h
+++ b/objective-c/src/Ice/Util.h
@@ -230,8 +230,6 @@ public:
virtual ~Exception() throw();
virtual std::string ice_id() const;
- ICE_DEPRECATED_API("ice_name() is deprecated, use ice_id() instead.")
- virtual std::string ice_name() const;
virtual void ice_print(std::ostream& os) const;
virtual Exception* ice_clone() const;
virtual void ice_throw() const;
diff --git a/objective-c/src/Ice/Util.mm b/objective-c/src/Ice/Util.mm
index 0edc33bab58..8ac8aa3f14b 100644
--- a/objective-c/src/Ice/Util.mm
+++ b/objective-c/src/Ice/Util.mm
@@ -408,12 +408,6 @@ IceObjC::Exception::~Exception() throw()
}
std::string
-IceObjC::Exception::ice_name() const
-{
- return "IceObjC::Exception";
-}
-
-std::string
IceObjC::Exception::ice_id() const
{
return "::IceObjC::Exception";
diff --git a/php/lib/Ice.php b/php/lib/Ice.php
index 4b366b80e25..0c42672cd3d 100644
--- a/php/lib/Ice.php
+++ b/php/lib/Ice.php
@@ -32,8 +32,12 @@ abstract class Ice_Exception extends Exception
parent::__construct($message);
}
- abstract public function ice_name();
abstract public function ice_id();
+ public function ice_name()
+ {
+ trigger_error('ice_name() is deprecated use ice_id() instead.', E_DEPRECATED);
+ return substr($this->ice_id(), 2);
+ }
}
abstract class Ice_UserException extends Ice_Exception
diff --git a/php/lib/Ice_ns.php b/php/lib/Ice_ns.php
index 429f94a8fd5..02618eb5f94 100644
--- a/php/lib/Ice_ns.php
+++ b/php/lib/Ice_ns.php
@@ -37,8 +37,12 @@ namespace Ice
parent::__construct($message);
}
- abstract public function ice_id();
- abstract public function ice_name();
+ abstract public function ice_id()
+ public function ice_name()
+ {
+ trigger_error('ice_name() is deprecated use ice_id() instead.', E_DEPRECATED);
+ return substr($this->ice_id(), 2);
+ }
}
abstract class UserException extends Exception
diff --git a/php/src/IcePHP/Types.cpp b/php/src/IcePHP/Types.cpp
index 2c1c52417cf..0aa78e4791b 100644
--- a/php/src/IcePHP/Types.cpp
+++ b/php/src/IcePHP/Types.cpp
@@ -3409,14 +3409,6 @@ IcePHP::ExceptionReader::ice_id() const
return _info->id;
}
-#ifndef ICE_CPP11_MAPPING
-string
-IcePHP::ExceptionReader::ice_name() const
-{
- return ice_id();
-}
-#endif
-
IcePHP::ExceptionReader*
IcePHP::ExceptionReader::ice_clone() const
{
diff --git a/php/src/IcePHP/Types.h b/php/src/IcePHP/Types.h
index af0f6c01ab1..c435d6ee313 100644
--- a/php/src/IcePHP/Types.h
+++ b/php/src/IcePHP/Types.h
@@ -598,10 +598,6 @@ public:
~ExceptionReader() throw();
virtual std::string ice_id() const;
-#ifndef ICE_CPP11_MAPPING
- ICE_DEPRECATED_API("ice_name() is deprecated, use ice_id() instead.")
- virtual std::string ice_name() const;
-#endif
virtual ExceptionReader* ice_clone() const;
virtual void ice_throw() const;
diff --git a/python/modules/IcePy/Types.cpp b/python/modules/IcePy/Types.cpp
index b7aa87a8204..39a951bfc4c 100644
--- a/python/modules/IcePy/Types.cpp
+++ b/python/modules/IcePy/Types.cpp
@@ -3716,18 +3716,12 @@ IcePy::ExceptionWriter::ice_id() const
}
#ifndef ICE_CPP11_MAPPING
-string
-IcePy::ExceptionWriter::ice_name() const
-{
- return ice_id();
-}
-#endif
-
Ice::UserException*
IcePy::ExceptionWriter::ice_clone() const
{
return new ExceptionWriter(*this);
}
+#endif
void
IcePy::ExceptionWriter::ice_throw() const
@@ -3776,19 +3770,13 @@ IcePy::ExceptionReader::ice_id() const
}
#ifndef ICE_CPP11_MAPPING
-string
-IcePy::ExceptionReader::ice_name() const
-{
- return ice_id();
-}
-#endif
-
Ice::UserException*
IcePy::ExceptionReader::ice_clone() const
{
assert(false);
return 0;
}
+#endif
void
IcePy::ExceptionReader::ice_throw() const
diff --git a/python/modules/IcePy/Types.h b/python/modules/IcePy/Types.h
index e67542f9195..150c42658fe 100644
--- a/python/modules/IcePy/Types.h
+++ b/python/modules/IcePy/Types.h
@@ -606,10 +606,8 @@ public:
virtual std::string ice_id() const;
#ifndef ICE_CPP11_MAPPING
- ICE_DEPRECATED_API("ice_name() is deprecated, use ice_id() instead.")
- virtual std::string ice_name() const;
-#endif
virtual Ice::UserException* ice_clone() const;
+#endif
virtual void ice_throw() const;
virtual void __write(Ice::OutputStream*) const;
@@ -641,10 +639,8 @@ public:
virtual std::string ice_id() const;
#ifndef ICE_CPP11_MAPPING
- ICE_DEPRECATED_API("ice_name() is deprecated, use ice_id() instead.")
- virtual std::string ice_name() const;
-#endif
virtual Ice::UserException* ice_clone() const;
+#endif
virtual void ice_throw() const;
virtual void __write(Ice::OutputStream*) const;
diff --git a/python/python/Ice.py b/python/python/Ice.py
index e3d5d32b46e..ff1deecd555 100644
--- a/python/python/Ice.py
+++ b/python/python/Ice.py
@@ -178,7 +178,7 @@ class Exception(Exception): # Derives from built-in base 'Exception' class.
def ice_name(self):
'''Returns the type name of this exception.'''
- return self._ice_name
+ return self.ice_id()[2:]
def ice_id(self):
'''Returns the type id of this exception.'''
diff --git a/ruby/src/IceRuby/Types.cpp b/ruby/src/IceRuby/Types.cpp
index da5832c7f9a..dabbbd39858 100644
--- a/ruby/src/IceRuby/Types.cpp
+++ b/ruby/src/IceRuby/Types.cpp
@@ -2098,7 +2098,7 @@ namespace
void
patchObject(void* addr, const Ice::ObjectPtr& v)
-{
+{
ReadObjectCallback* cb = static_cast<ReadObjectCallback*>(addr);
assert(cb);
cb->invoke(v);
@@ -2832,19 +2832,13 @@ IceRuby::ExceptionReader::ice_id() const
}
#ifndef ICE_CPP11_MAPPING
-string
-IceRuby::ExceptionReader::ice_name() const
-{
- return ice_id();
-}
-#endif
-
Ice::UserException*
IceRuby::ExceptionReader::ice_clone() const
{
assert(false);
return 0;
}
+#endif
void
IceRuby::ExceptionReader::ice_throw() const
diff --git a/ruby/src/IceRuby/Types.h b/ruby/src/IceRuby/Types.h
index 091e4215229..37787c22339 100644
--- a/ruby/src/IceRuby/Types.h
+++ b/ruby/src/IceRuby/Types.h
@@ -544,10 +544,8 @@ public:
virtual std::string ice_id() const;
#ifndef ICE_CPP11_MAPPING
- ICE_DEPRECATED_API("ice_name() is deprecated, use ice_id() instead.")
- virtual std::string ice_name() const;
-#endif
virtual Ice::UserException* ice_clone() const;
+#endif
virtual void ice_throw() const;
virtual void __write(Ice::OutputStream*) const;