[Bf-extensions-cvs] [ce2ced1] master: MeasureIt: Enable error catch to avoid hidden errors in big try except block

Antonioya noreply at git.blender.org
Tue Aug 9 18:23:47 CEST 2016


Commit: ce2ced159895f41a7dbfac38f61e6d3421dd7346
Author: Antonioya
Date:   Tue Aug 9 17:00:55 2016 +0200
Branches: master
https://developer.blender.org/rBAce2ced159895f41a7dbfac38f61e6d3421dd7346

MeasureIt: Enable error catch to avoid hidden errors in big try except block

In some situations an unexpected error could appear in OpenGL. This try
block catch
this error and finish smoothly the routine and print a error message in
the console to avoid the error keeps hidden, specially if some API
change.

===================================================================

M	measureit/measureit_geometry.py

===================================================================

diff --git a/measureit/measureit_geometry.py b/measureit/measureit_geometry.py
index 7f4032e..c542df8 100644
--- a/measureit/measureit_geometry.py
+++ b/measureit/measureit_geometry.py
@@ -635,8 +635,7 @@ def draw_segments(context, myobj, op, region, rv3d):
                 except IndexError:
                     ms.glfree = True
                 except:
-                    # print("Unexpected error:" + str(exc_info()))
-                    # if error, disable segment
+                    print("Unexpected error:" + str(exc_info()))
                     pass
 
     return



More information about the Bf-extensions-cvs mailing list