diff options
author | Mark Spruiell <mes@zeroc.com> | 2009-02-12 11:42:01 -0800 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2009-02-12 11:42:01 -0800 |
commit | 215dbf06a885c6754572279b38d2ac4e823a57ba (patch) | |
tree | 1af98a5457c070bc0a233039504a6c97fcd2222a /py/modules/IcePy/ObjectFactory.cpp | |
parent | minor tweaks to various README/INSTALL files (diff) | |
download | ice-215dbf06a885c6754572279b38d2ac4e823a57ba.tar.bz2 ice-215dbf06a885c6754572279b38d2ac4e823a57ba.tar.xz ice-215dbf06a885c6754572279b38d2ac4e823a57ba.zip |
bug 3356 - review use of AbortMarshaling in Python extension
Diffstat (limited to 'py/modules/IcePy/ObjectFactory.cpp')
-rw-r--r-- | py/modules/IcePy/ObjectFactory.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/py/modules/IcePy/ObjectFactory.cpp b/py/modules/IcePy/ObjectFactory.cpp index cfc87158368..badf7716ae1 100644 --- a/py/modules/IcePy/ObjectFactory.cpp +++ b/py/modules/IcePy/ObjectFactory.cpp @@ -62,6 +62,7 @@ IcePy::ObjectFactory::create(const string& id) PyObjectHandle obj = PyObject_CallMethod(factory, STRCAST("create"), STRCAST("s"), id.c_str()); if(!obj.get()) { + assert(PyErr_Occurred()); throw AbortMarshaling(); } if(obj.get() == Py_None) @@ -87,6 +88,7 @@ IcePy::ObjectFactory::create(const string& id) PyObjectHandle obj = type->tp_new(type, args.get(), 0); if(!obj.get()) { + assert(PyErr_Occurred()); throw AbortMarshaling(); } @@ -116,7 +118,7 @@ IcePy::ObjectFactory::destroy() // Invoke the destroy method on each registered Python factory. // PyObjectHandle obj = PyObject_CallMethod(p->second, STRCAST("destroy"), 0); - PyErr_Clear(); + PyErr_Clear(); // Ignore errors. Py_DECREF(p->second); } } |