set exception message when returning with 0
This commit is contained in:
@@ -86,7 +86,10 @@ PyObject* PathSimPy::GetResultMesh(PyObject * args)
|
||||
return 0;
|
||||
cStock *stock = getPathSimPtr()->m_stock;
|
||||
if (stock == NULL)
|
||||
{
|
||||
PyErr_SetString(PyExc_RuntimeError, "Simulation has stock object");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Mesh::MeshObject *meshOuter = new Mesh::MeshObject();
|
||||
Mesh::MeshPy *meshOuterpy = new Mesh::MeshPy(meshOuter);
|
||||
|
||||
Reference in New Issue
Block a user