[Python] ReactorNet.step now translates exceptions appropriately

This commit is contained in:
Ray Speth 2012-08-11 23:58:23 +00:00
parent bf727c2631
commit 8a3bb109d6

View file

@ -739,7 +739,11 @@ py_reactornet_step(PyObject* self, PyObject* args)
if (!PyArg_ParseTuple(args, "id:reactornet_step", &n, &t)) {
return NULL;
}
return Py_BuildValue("d",reactornet_step(n, t));
double ret = reactornet_step(n, t);
if (ret == DERR) {
return reportCanteraError();
}
return Py_BuildValue("d", ret);
}