Fixed a serious issue handling 'non-error' exceptions in the debugger. This bug was about 10 years old. 6_0_x

Fri, 23 Jan 2015 20:27:35 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 23 Jan 2015 20:27:35 +0100
branch
6_0_x
changeset 4064
c918bd03f0ff
parent 4062
7d7ce7fdccfd
child 4066
3dc03cbd6fd8

Fixed a serious issue handling 'non-error' exceptions in the debugger. This bug was about 10 years old.
(grafted from b7269498aa95bdf2e28c7a23697e1b0a6cdc638b)

DebugClients/Python/DebugBase.py file | annotate | diff | comparison | revisions
DebugClients/Python/DebugClientBase.py file | annotate | diff | comparison | revisions
DebugClients/Python3/DebugBase.py file | annotate | diff | comparison | revisions
DebugClients/Python3/DebugClientBase.py file | annotate | diff | comparison | revisions
--- a/DebugClients/Python/DebugBase.py	Thu Jan 22 19:16:51 2015 +0100
+++ b/DebugClients/Python/DebugBase.py	Fri Jan 23 20:27:35 2015 +0100
@@ -636,6 +636,11 @@
         @param exctb traceback for the exception
         @param unhandled flag indicating an uncaught exception
         """
+        
+        if exctype in [GeneratorExit, StopIteration]:
+            # ignore these
+            return
+        
         if exctype in [SystemExit, bdb.BdbQuit]:
             atexit._run_exitfuncs()
             if excval is None:
--- a/DebugClients/Python/DebugClientBase.py	Thu Jan 22 19:16:51 2015 +0100
+++ b/DebugClients/Python/DebugClientBase.py	Fri Jan 23 20:27:35 2015 +0100
@@ -325,7 +325,10 @@
             d = {}
             d["id"] = -1
             d["name"] = "MainThread"
-            d["broken"] = self.isBroken()
+            if hasattr(self, "isBroken"):
+                d["broken"] = self.isBroken()
+            else:
+                d["broken"] = False
             threadList.append(d)
         
         self.write('%s%s\n' % (DebugProtocol.ResponseThreadList,
--- a/DebugClients/Python3/DebugBase.py	Thu Jan 22 19:16:51 2015 +0100
+++ b/DebugClients/Python3/DebugBase.py	Fri Jan 23 20:27:35 2015 +0100
@@ -646,6 +646,11 @@
         @param unhandled flag indicating an uncaught exception
         """
         exctype, excval, exctb = excinfo
+        
+        if exctype in [GeneratorExit, StopIteration]:
+            # ignore these
+            return
+        
         if exctype in [SystemExit, bdb.BdbQuit]:
             atexit._run_exitfuncs()
             if excval is None:
--- a/DebugClients/Python3/DebugClientBase.py	Thu Jan 22 19:16:51 2015 +0100
+++ b/DebugClients/Python3/DebugClientBase.py	Fri Jan 23 20:27:35 2015 +0100
@@ -294,7 +294,10 @@
             d = {}
             d["id"] = -1
             d["name"] = "MainThread"
-            d["broken"] = self.isBroken()
+            if hasattr(self, "isBroken"):
+                d["broken"] = self.isBroken()
+            else:
+                d["broken"] = False
             threadList.append(d)
         
         self.write("{0}{1!r}\n".format(DebugProtocol.ResponseThreadList,

eric ide

mercurial