summaryrefslogtreecommitdiff
path: root/cpp/src/IceUtil/Exception.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2007-03-22 00:45:02 +0000
committerMichi Henning <michi@zeroc.com>2007-03-22 00:45:02 +0000
commit751ebc4afac36d7366274201f2ef09b784e3b20f (patch)
tree14a31afa3767eb29080f10f7bc1d96ce5deddde2 /cpp/src/IceUtil/Exception.cpp
parentfixing bug in propertyToProxy (diff)
downloadice-751ebc4afac36d7366274201f2ef09b784e3b20f.tar.bz2
ice-751ebc4afac36d7366274201f2ef09b784e3b20f.tar.xz
ice-751ebc4afac36d7366274201f2ef09b784e3b20f.zip
Changed IceUtil::Exception::what() to swallow all exceptions because it has
a throw() exception specification.
Diffstat (limited to 'cpp/src/IceUtil/Exception.cpp')
-rw-r--r--cpp/src/IceUtil/Exception.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/cpp/src/IceUtil/Exception.cpp b/cpp/src/IceUtil/Exception.cpp
index 5208bfe0a2d..91b33d515ae 100644
--- a/cpp/src/IceUtil/Exception.cpp
+++ b/cpp/src/IceUtil/Exception.cpp
@@ -57,16 +57,23 @@ IceUtil::Exception::ice_print(ostream& out) const
const char*
IceUtil::Exception::what() const throw()
{
- StaticMutex::Lock lock(globalMutex);
+ try
{
- if(_str.empty())
+ StaticMutex::Lock lock(globalMutex);
{
- stringstream s;
- ice_print(s);
- _str = s.str(); // Lazy initialization.
+ if(_str.empty())
+ {
+ stringstream s;
+ ice_print(s);
+ _str = s.str(); // Lazy initialization.
+ }
}
+ return _str.c_str();
}
- return _str.c_str();
+ catch(...)
+ {
+ }
+ return "";
}
IceUtil::Exception*