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

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

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 23 Jan 2015 20:27:35 +0100
changeset 4063
b7269498aa95
parent 4061
8880a520e932
child 4065
8e81259fb739

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

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
diff -r 8880a520e932 -r b7269498aa95 DebugClients/Python/DebugBase.py
--- 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:
diff -r 8880a520e932 -r b7269498aa95 DebugClients/Python/DebugClientBase.py
--- 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,
diff -r 8880a520e932 -r b7269498aa95 DebugClients/Python3/DebugBase.py
--- 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:
diff -r 8880a520e932 -r b7269498aa95 DebugClients/Python3/DebugClientBase.py
--- 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