View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001422 | FreeCAD | Merge request | public | 2014-02-19 09:46 | 2014-09-17 10:10 |
Reporter | shoogen | Assigned To | wmayer | ||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Product Version | trunk | ||||
Summary | 0001422: Subclass Exception | ||||
Description | currently there is no way to distinguish FreeCAD created exceptions form Exceptions created by the cpython interpreter or by thrid party modules. It would be fine to use ValueError for invalid input data. But raising the Base Exception (with just a string paramter) should be avoided. 1. There should be a FreeCAD_Error for all exceptions generated in the c++ code which can't be attributed to a single module. 2. The Part Module should define a OCCT_Error which handles a the errors. 2a. This should be even subclassed for common Errors like "Brep not done" 3. This should be used in other modules (An example for a pure python module can be found in the OpenSCAD module. It raises a subclassed Exception if Running the OpenSCAD executable fails) | ||||
Tags | exception | ||||
FreeCAD Information | |||||
|
http://docs.python.org/2/extending/extending.html#intermezzo-errors-and-exceptions PyErr_NewException |
|
git://github.com/5263/FreeCAD.git review-exceptions |
FreeCAD: master 5e51a6cd 2014-08-19 11:18:19 Committer: wmayer Details Diff |
fixes 0001422: Subclass Exception inherit Base.FreeCADError form RuntimeError inherit Part.OCCError from Base.FreeCADError inherit OCCDomainError from Part.OCCError inherit OCCRangeError from Part.OCCError inherit OCCConstructionError from OCCDomainError inherit OCCDimensionError from OCCDomainError Added PY_CATCH_OCC macro replace PyExc_Exception use FreeCADError in makeWireString catch exception in BSplineCurve.increasedegree |
Affected Issues 0001422 |
|
mod - src/App/Application.cpp | Diff File | ||
mod - src/App/ApplicationPy.cpp | Diff File | ||
mod - src/App/DocumentObjectGroupPyImp.cpp | Diff File | ||
mod - src/App/FeaturePythonPyImp.inl | Diff File | ||
mod - src/Base/AxisPyImp.cpp | Diff File | ||
mod - src/Base/BoundBoxPyImp.cpp | Diff File | ||
mod - src/Base/MatrixPyImp.cpp | Diff File | ||
mod - src/Base/PlacementPyImp.cpp | Diff File | ||
mod - src/Base/PyObjectBase.cpp | Diff File | ||
mod - src/Base/PyObjectBase.h | Diff File | ||
mod - src/Base/VectorPyImp.cpp | Diff File | ||
mod - src/Gui/ApplicationPy.cpp | Diff File | ||
mod - src/Gui/Selection.cpp | Diff File | ||
mod - src/Gui/ViewProviderPyImp.cpp | Diff File | ||
mod - src/Main/FreeCADGuiPy.cpp | Diff File | ||
mod - src/Mod/Drawing/App/AppDrawingPy.cpp | Diff File | ||
mod - src/Mod/Drawing/Gui/AppDrawingGuiPy.cpp | Diff File | ||
mod - src/Mod/Fem/App/AppFemPy.cpp | Diff File | ||
mod - src/Mod/Fem/App/FemMeshPyImp.cpp | Diff File | ||
mod - src/Mod/Fem/Gui/AppFemGuiPy.cpp | Diff File | ||
mod - src/Mod/Fem/Gui/ViewProviderFemMeshPyImp.cpp | Diff File | ||
mod - src/Mod/Import/App/AppImportPy.cpp | Diff File | ||
mod - src/Mod/Import/Gui/AppImportGuiPy.cpp | Diff File | ||
mod - src/Mod/Mesh/App/AppMeshPy.cpp | Diff File | ||
mod - src/Mod/Mesh/App/MeshFeaturePyImp.cpp | Diff File | ||
mod - src/Mod/Mesh/App/MeshPointPyImp.cpp | Diff File | ||
mod - src/Mod/Mesh/App/MeshPyImp.cpp | Diff File | ||
mod - src/Mod/MeshPart/App/AppMeshPartPy.cpp | Diff File | ||
mod - src/Mod/Part/App/AppPart.cpp | Diff File | ||
mod - src/Mod/Part/App/AppPartPy.cpp | Diff File | ||
mod - src/Mod/Part/App/ArcOfCirclePyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/ArcPyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/BSplineCurvePyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/BSplineSurfacePyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/BezierCurvePyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/BezierSurfacePyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/CMakeLists.txt | Diff File | ||
mod - src/Mod/Part/App/CirclePyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/ConePyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/CylinderPyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/EllipsePyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/GeometryCurvePyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/GeometryPyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/GeometrySurfacePyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/HyperbolaPyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/LinePyImp.cpp | Diff File | ||
add - src/Mod/Part/App/OCCError.h | Diff File | ||
mod - src/Mod/Part/App/OffsetCurvePyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/OffsetSurfacePyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/ParabolaPyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/PlanePyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/RectangularTrimmedSurfacePyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/SpherePyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/SurfaceOfExtrusionPyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/SurfaceOfRevolutionPyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/TopoShapeCompSolidPyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/TopoShapeCompoundPyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/TopoShapeEdgePyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/TopoShapeFacePyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/TopoShapePyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/TopoShapeShellPyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/TopoShapeSolidPyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/TopoShapeWirePyImp.cpp | Diff File | ||
mod - src/Mod/Part/App/TopologyPy.cpp | Diff File | ||
mod - src/Mod/Part/App/ToroidPyImp.cpp | Diff File | ||
mod - src/Mod/PartDesign/App/AppPartDesignPy.cpp | Diff File | ||
mod - src/Mod/Points/App/PointsPyImp.cpp | Diff File | ||
mod - src/Mod/ReverseEngineering/App/AppReverseEngineeringPy.cpp | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-02-19 09:46 | shoogen | New Issue | |
2014-02-19 10:00 | shoogen | Note Added: 0004238 | |
2014-08-19 08:24 | shoogen | Relationship added | related to 0001697 |
2014-08-19 13:30 | shoogen | Relationship added | related to 0001700 |
2014-08-19 14:13 | shoogen | Relationship added | related to 0001286 |
2014-08-24 09:56 | shoogen | Note Added: 0004998 | |
2014-08-24 09:56 | shoogen | Category | Feature => Merge request |
2014-08-24 10:06 | shoogen | Tag Attached: exception | |
2014-09-17 10:10 | wmayer | Changeset attached | => FreeCAD Master master 5e51a6cd |
2014-09-17 10:10 | wmayer | Assigned To | => wmayer |
2014-09-17 10:10 | wmayer | Status | new => closed |
2014-09-17 10:10 | wmayer | Resolution | open => fixed |
2015-01-28 11:03 | shoogen | Relationship deleted | related to 0001697 |