summaryrefslogtreecommitdiff
path: root/py/modules/IcePy/Util.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2007-01-26 23:31:01 +0000
committerMark Spruiell <mes@zeroc.com>2007-01-26 23:31:01 +0000
commit8322350f71d4236acf7e19d1b9fdebc67c77813f (patch)
tree808a18621271be18b711639ceea99ba39dcd4454 /py/modules/IcePy/Util.cpp
parentadding thread-per-connection, prefer-secure proxy methods (diff)
downloadice-8322350f71d4236acf7e19d1b9fdebc67c77813f.tar.bz2
ice-8322350f71d4236acf7e19d1b9fdebc67c77813f.tar.xz
ice-8322350f71d4236acf7e19d1b9fdebc67c77813f.zip
bug fix for raising local exceptions
Diffstat (limited to 'py/modules/IcePy/Util.cpp')
-rw-r--r--py/modules/IcePy/Util.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/py/modules/IcePy/Util.cpp b/py/modules/IcePy/Util.cpp
index 44dced4e48d..fa313ffe5cf 100644
--- a/py/modules/IcePy/Util.cpp
+++ b/py/modules/IcePy/Util.cpp
@@ -276,8 +276,14 @@ IcePy::PyException::getTypeName()
#else
PyObject* cls = (PyObject*)ex.get()->ob_type;
#endif
- PyObjectHandle str = PyObject_Str(cls);
- return PyString_AsString(str.get());
+ PyObjectHandle name = PyObject_GetAttrString(cls, "__name__");
+ assert(name.get());
+ PyObjectHandle mod = PyObject_GetAttrString(cls, "__module__");
+ assert(mod.get());
+ string result = PyString_AsString(mod.get());
+ result += ".";
+ result += PyString_AsString(name.get());
+ return result;
}
IcePy::AllowThreads::AllowThreads()