summaryrefslogtreecommitdiff
path: root/py/modules/IcePy/Operation.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/Operation.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/Operation.cpp')
-rw-r--r--py/modules/IcePy/Operation.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/py/modules/IcePy/Operation.cpp b/py/modules/IcePy/Operation.cpp
index b6ec94283b1..19ae001c952 100644
--- a/py/modules/IcePy/Operation.cpp
+++ b/py/modules/IcePy/Operation.cpp
@@ -1799,10 +1799,7 @@ IcePy::TypedUpcall::exception(PyException& ex)
// However, we have no way to pass this exception to the interpreter,
// so we act on it directly.
//
- if(PyObject_IsInstance(ex.ex.get(), PyExc_SystemExit))
- {
- handleSystemExit(ex.ex.get()); // Does not return.
- }
+ ex.checkSystemExit();
PyObject* userExceptionType = lookupType("Ice.UserException");
@@ -1822,6 +1819,9 @@ IcePy::TypedUpcall::exception(PyException& ex)
else
{
Ice::OutputStreamPtr os = Ice::createOutputStream(_communicator);
+
+ os->writeBool(info->usesClasses);
+
ObjectMap objectMap;
info->marshal(ex.ex.get(), os, &objectMap);
@@ -2058,10 +2058,7 @@ IcePy::BlobjectUpcall::exception(PyException& ex)
// However, we have no way to pass this exception to the interpreter,
// so we act on it directly.
//
- if(PyObject_IsInstance(ex.ex.get(), PyExc_SystemExit))
- {
- handleSystemExit(ex.ex.get()); // Does not return.
- }
+ ex.checkSystemExit();
ex.raise();
}