summaryrefslogtreecommitdiff
path: root/py/modules/IcePy/Util.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2007-11-05 12:19:49 -0800
committerMark Spruiell <mes@zeroc.com>2007-11-05 12:19:49 -0800
commit3c8924663df8629b33c2ddd38907c4bf2eeb83cd (patch)
tree83b63f2396201019163d140555e42d79f82e46d3 /py/modules/IcePy/Util.cpp
parentMerge branch 'master' of ssh://cvs.zeroc.com/home/git/ice (diff)
downloadice-3c8924663df8629b33c2ddd38907c4bf2eeb83cd.tar.bz2
ice-3c8924663df8629b33c2ddd38907c4bf2eeb83cd.tar.xz
ice-3c8924663df8629b33c2ddd38907c4bf2eeb83cd.zip
- Fixing bug 2522 for Python. This involved adding the C++ class
UserExceptionWriter so that the Python extension can wrap a native Python user exception into something that the C++ run time can marshal. Also ported the changes to the servantLocator test. - Implementing UserExceptionWriter in Java and C#. - Consolidating the source files for the C# streaming API.
Diffstat (limited to 'py/modules/IcePy/Util.cpp')
-rw-r--r--py/modules/IcePy/Util.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/py/modules/IcePy/Util.cpp b/py/modules/IcePy/Util.cpp
index edf92dc2c14..98f51a460e0 100644
--- a/py/modules/IcePy/Util.cpp
+++ b/py/modules/IcePy/Util.cpp
@@ -58,7 +58,7 @@ IcePy::PyObjectHandle::operator=(const PyObjectHandle& p)
}
PyObject*
-IcePy::PyObjectHandle::get()
+IcePy::PyObjectHandle::get() const
{
return _p;
}
@@ -153,6 +153,15 @@ IcePy::PyException::raise()
}
void
+IcePy::PyException::checkSystemExit()
+{
+ if(PyObject_IsInstance(ex.get(), PyExc_SystemExit))
+ {
+ handleSystemExit(ex.get()); // Does not return.
+ }
+}
+
+void
IcePy::PyException::raiseLocalException()
{
string typeName = getTypeName();