Handle OCC exception in exportStl

This commit is contained in:
wmayer 2012-05-26 00:29:29 +02:00 committed by logari81
parent d92f627a8d
commit 455f5a67c3

View File

@ -347,7 +347,12 @@ PyObject* TopoShapePy::exportStl(PyObject *args)
}
catch (const Base::Exception& e) {
PyErr_SetString(PyExc_Exception,e.what());
return NULL;
return 0;
}
catch (Standard_Failure) {
Handle_Standard_Failure e = Standard_Failure::Caught();
PyErr_SetString(PyExc_Exception, e->GetMessageString());
return 0;
}
Py_Return;