Py: replace BaseExceptionFreeCADError with more suitable exception types

This commit is contained in:
wmayer
2022-03-17 13:54:23 +01:00
parent 18847444d4
commit 1f12dca2b4
38 changed files with 148 additions and 133 deletions

View File

@@ -204,7 +204,8 @@ private:
}
}
catch (Base::Exception &e) {
throw Py::Exception(Base::BaseExceptionFreeCADError, e.what());
e.setPyException();
throw Py::Exception();
}
return Py::None();
@@ -249,7 +250,8 @@ private:
}
}
catch (Base::Exception &e) {
throw Py::Exception(Base::BaseExceptionFreeCADError, e.what());
e.setPyException();
throw Py::Exception();
}
return Py::None();
@@ -310,7 +312,8 @@ private:
}
}
catch (Base::Exception &e) {
throw Py::Exception(Base::BaseExceptionFreeCADError, e.what());
e.setPyException();
throw Py::Exception();
}
PyObject* pyResult = nullptr;
@@ -356,7 +359,8 @@ private:
}
}
catch (Base::Exception &e) {
throw Py::Exception(Base::BaseExceptionFreeCADError, e.what());
e.setPyException();
throw Py::Exception();
}
return Py::None();