Py: replace BaseExceptionFreeCADError with more suitable exception types

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

View File

@@ -910,12 +910,13 @@ private:
return Py::asObject(topo.getPyObject());
}
throw Py::Exception(Base::BaseExceptionFreeCADError, std::string("Argument type signature not recognized. Should be either (list, string), or (shape, string)"));
throw Py::TypeError(std::string("Argument type signature not recognized. Should be either (list, string), or (shape, string)"));
} catch (Standard_Failure& e) {
throw Py::Exception(PartExceptionOCCError, e.GetMessageString());
} catch (Base::Exception &e){
throw Py::Exception(Base::BaseExceptionFreeCADError, e.what());
e.setPyException();
throw Py::Exception();
}
}
Py::Object makeFilledFace(const Py::Tuple& args)