py/rna: BPy_reports_to_error() now takes the exception type as an argument and returns -1 as an error value

This commit is contained in:
2011-03-12 15:18:08 +00:00
parent a5e59ede6e
commit 90d42e114c
5 changed files with 12 additions and 13 deletions

View File

@@ -198,8 +198,7 @@ static PyObject *pyop_call(PyObject *UNUSED(self), PyObject *args)
operator_ret= WM_operator_call_py(C, ot, context, &ptr, reports);
if(BPy_reports_to_error(reports, FALSE))
error_val = -1;
error_val= BPy_reports_to_error(reports, PyExc_RuntimeError, FALSE);
/* operator output is nice to have in the terminal/console too */
if(reports->list.first) {