Base: fix pyCall() exception
This function is wildly used in FeaturePython and ViewProviderPythonFeature, which explicitly catches Py::Exception, not Base::Exception. So pyCall() should throw Py::Exception, too.
This commit is contained in:
@@ -124,14 +124,14 @@ protected:
|
||||
inline Py::Object pyCall(PyObject *callable, PyObject *args=0) {
|
||||
PyObject *result = PyObject_CallObject(callable, args);
|
||||
if(!result)
|
||||
Base::PyException::ThrowException();
|
||||
throw Py::Exception();
|
||||
return Py::asObject(result);
|
||||
}
|
||||
|
||||
inline Py::Object pyCallWithKeywords(PyObject *callable, PyObject *args, PyObject *kwds=0) {
|
||||
PyObject *result = PyObject_Call(callable, args, kwds);
|
||||
if(!result)
|
||||
Base::PyException::ThrowException();
|
||||
throw Py::Exception();
|
||||
return Py::asObject(result);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user