summaryrefslogtreecommitdiff
path: root/py/modules/IcePy/Operation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'py/modules/IcePy/Operation.cpp')
-rw-r--r--py/modules/IcePy/Operation.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/py/modules/IcePy/Operation.cpp b/py/modules/IcePy/Operation.cpp
index f402b3b928c..083aa75aa66 100644
--- a/py/modules/IcePy/Operation.cpp
+++ b/py/modules/IcePy/Operation.cpp
@@ -732,6 +732,12 @@ amdCallbackIceException(AMDCallbackObject* self, PyObject* args)
return 0;
}
+ if(!PyObject_IsInstance(ex, PyExc_Exception))
+ {
+ PyErr_Format(PyExc_TypeError, "ice_exception argument is not an exception");
+ return 0;
+ }
+
try
{
assert(self->upcall);