From 8078b7e0a7a810a44ff2d273b7e020e65452bf63 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 26 May 2012 00:29:29 +0200 Subject: [PATCH] Handle OCC exception in exportStl --- src/Mod/Part/App/TopoShapePyImp.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Mod/Part/App/TopoShapePyImp.cpp b/src/Mod/Part/App/TopoShapePyImp.cpp index 3aef9eab90..8f641a2f7e 100644 --- a/src/Mod/Part/App/TopoShapePyImp.cpp +++ b/src/Mod/Part/App/TopoShapePyImp.cpp @@ -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;