View Issue Details

IDProjectCategoryView StatusLast Update
0001700FreeCADFeaturepublic2017-04-28 17:40
Reportershoogen Assigned Toshoogen  
PrioritynoneSeveritymajorReproducibilityN/A
Status closedResolutionfixed 
Fixed in Version0.15 
Summary0001700: do not raise (pythons) base Exception
Descriptionbase Exceptions can not be caught with all derived types. Like KeyboardInterrupt or IOError. This leads to a bad design as it forces user catch Exception he does not expect.
All Exception needs to be derived from "StandardError". Preferably "StandardError" or "RuntimeError" should be subclassed.

Do not close this ticket as long as
grep -r PyErr_SetString\(\w*PyExc_Exception
returns any result
Tagsexception
FreeCAD Information

Relationships

related to 0001422 closedwmayer Subclass Exception 
related to 0001286 closedshoogen OCCT Exceptions without a Message causes SIGSEGV 
child of 0001701 closed do not catch BaseException, Exception, StandardError or Warning 

Activities

shoogen

2014-08-24 11:49

developer   ~0004999

$ grep -r -E "raise Exception" src/Mod/ |cut -d "/" -f 3 |sort |uniq -c |sort -rn
      9 Spreadsheet
      8 Part
      5 Ship
      5 Plot
      3 TemplatePyMod
      3 PartDesign
      2 OpenSCAD
      1 Draft

Related Changesets

FreeCAD: master a81a3073

2014-08-24 14:33:10

shoogen

Details Diff
issue 0001700 replace raise Exception() Affected Issues
0001700
mod - src/Mod/Draft/DraftGeomUtils.py Diff File
mod - src/Mod/Part/Gui/TaskShapeBuilder.cpp Diff File
mod - src/Mod/PartDesign/Scripts/Epitrochoid.py Diff File
mod - src/Mod/PartDesign/Scripts/FilletArc.py Diff File
mod - src/Mod/PartDesign/Scripts/RadialCopy.py Diff File
mod - src/Mod/Plot/plotAxes/TaskPanel.py Diff File
mod - src/Mod/Plot/plotLabels/TaskPanel.py Diff File
mod - src/Mod/Plot/plotPositions/TaskPanel.py Diff File
mod - src/Mod/Plot/plotSave/TaskPanel.py Diff File
mod - src/Mod/Plot/plotSeries/TaskPanel.py Diff File
mod - src/Mod/Ship/shipAreasCurve/TaskPanel.py Diff File
mod - src/Mod/Ship/shipCreateShip/TaskPanel.py Diff File
mod - src/Mod/Ship/shipHydrostatics/TaskPanel.py Diff File
mod - src/Mod/Ship/shipLoadExample/TaskPanel.py Diff File
mod - src/Mod/Ship/shipOutlineDraw/TaskPanel.py Diff File
mod - src/Mod/Spreadsheet/Spreadsheet.py Diff File
mod - src/Mod/TemplatePyMod/Automation.py Diff File
mod - src/Mod/TemplatePyMod/DocumentObject.py Diff File
mod - src/Mod/TemplatePyMod/TaskPanel.py Diff File

FreeCAD: master ed66ada1

2014-08-29 21:12:45

shoogen


Committer: wmayer Details Diff
issue 0001700 replace PyExc_Exception Affected Issues
0001700
mod - src/App/ApplicationPy.cpp Diff File
mod - src/App/DocumentObjectGroupPyImp.cpp Diff File
mod - src/App/DocumentPyImp.cpp Diff File
mod - src/App/FeaturePythonPyImp.inl Diff File
mod - src/Base/Console.cpp Diff File
mod - src/Base/PyObjectBase.h Diff File
mod - src/Gui/ApplicationPy.cpp Diff File
mod - src/Gui/DocumentPyImp.cpp Diff File
mod - src/Gui/ViewProviderPythonFeaturePyImp.cpp Diff File
mod - src/Main/FreeCADGuiPy.cpp Diff File
mod - src/Mod/Image/Gui/AppImageGuiPy.cpp Diff File
mod - src/Mod/JtReader/App/AppJtReaderPy.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/AppPartPy.cpp Diff File
mod - src/Mod/Part/App/TopoShapePyImp.cpp Diff File
mod - src/Mod/Points/App/AppPointsPy.cpp Diff File
mod - src/Mod/Raytracing/App/AppRaytracingPy.cpp Diff File
mod - src/Mod/Robot/App/TrajectoryPyImp.cpp Diff File
mod - src/Mod/Sketcher/App/AppSketcherPy.cpp Diff File
mod - src/Tools/generateTemplates/templateClassPyExport.py Diff File

FreeCAD: master 18f723cb

2017-04-28 17:33:51

wmayer

Details Diff
use specialized Python exception classes Affected Issues
0001700
mod - src/Mod/Import/App/AppImportPy.cpp Diff File
mod - src/Mod/Part/App/Geom2d/Curve2dPyImp.cpp Diff File
mod - src/Mod/Part/App/GeometryCurvePyImp.cpp Diff File
mod - src/Mod/Part/App/GeometrySurfacePyImp.cpp Diff File

Issue History

Date Modified Username Field Change
2014-08-19 13:30 shoogen New Issue
2014-08-19 13:30 shoogen Relationship added related to 0001422
2014-08-19 13:42 shoogen Relationship added child of 0001701
2014-08-19 14:13 shoogen Relationship added related to 0001286
2014-08-24 09:43 shoogen Tag Attached: exception
2014-08-24 09:48 shoogen Category Feature => Merge request
2014-08-24 09:49 shoogen Category Merge request => Feature
2014-08-24 11:49 shoogen Note Added: 0004999
2014-09-02 07:09 shoogen Changeset attached => FreeCAD Master master a81a3073
2014-09-17 10:10 wmayer Changeset attached => FreeCAD Master master ed66ada1
2014-09-17 11:00 shoogen Status new => closed
2014-09-17 11:00 shoogen Assigned To => shoogen
2014-09-17 11:00 shoogen Resolution open => fixed
2014-09-17 11:00 shoogen Fixed in Version => 0.15
2017-04-28 17:40 wmayer Changeset attached => FreeCAD master 18f723cb