From a93a5e9c931d5ae46e5f9516c62972ded3b0ed8a Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Sat, 27 Oct 2018 08:43:14 +0200 Subject: [PATCH] Sketcher: Use transparent exception mechanism for fillets ========================================================= This ensures that the exception back in the c++ that invoked python retains the type of exception and can be properly catched. --- src/Mod/Sketcher/App/SketchObjectPyImp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/Sketcher/App/SketchObjectPyImp.cpp b/src/Mod/Sketcher/App/SketchObjectPyImp.cpp index 75f9439a6c..4322ba3062 100644 --- a/src/Mod/Sketcher/App/SketchObjectPyImp.cpp +++ b/src/Mod/Sketcher/App/SketchObjectPyImp.cpp @@ -876,9 +876,9 @@ PyObject* SketchObjectPy::fillet(PyObject *args) if (this->getSketchObjectPtr()->fillet(geoId1, geoId2, v1, v2, radius, trim?true:false)) { std::stringstream str; - str << "Not able to fillet lineSegments with ids : (" << geoId1 << ", " << geoId2 << ") and points (" << v1.x << ", " << v1.y << ", " << v1.z << ") & " + str << "Not able to fillet curves with ids : (" << geoId1 << ", " << geoId2 << ") and points (" << v1.x << ", " << v1.y << ", " << v1.z << ") & " << "(" << v2.x << ", " << v2.y << ", " << v2.z << ")"; - PyErr_SetString(PyExc_ValueError, str.str().c_str()); + THROWM(Base::ValueError, str.str().c_str()) return 0; } Py_Return;