[Gd-chatter] r11519 - trunk/libraries/gui-sniffer

hannes at gwydiondylan.org hannes at gwydiondylan.org
Wed Dec 5 01:17:57 CET 2007


Author: hannes
Date: Wed Dec  5 01:17:56 2007
New Revision: 11519

Modified:
   trunk/libraries/gui-sniffer/gui-sniffer.dylan
Log:
Bug: 7299
use handlers instead of blocks for exceptions to not unwind the stack
before signalling of the exception


Modified: trunk/libraries/gui-sniffer/gui-sniffer.dylan
==============================================================================
--- trunk/libraries/gui-sniffer/gui-sniffer.dylan	(original)
+++ trunk/libraries/gui-sniffer/gui-sniffer.dylan	Wed Dec  5 01:17:56 2007
@@ -404,14 +404,16 @@
 
 define method safe(func :: <function>)
   method(#rest args)
-    block()
+    block(return)
+      let handler <error>
+        = method(condition, next-handler)
+              if (*debugging?*)
+                next-handler()
+              else
+                return("broken")
+              end;
+          end;
       apply(func, args)
-    exception (e :: <error>)
-      if(*debugging?*)
-        break()
-      else
-        "broken"
-      end
     end
   end
 end;
@@ -419,13 +421,14 @@
 define method safe-p(func :: <function>)
   method(#rest args)
     block(return)
-      let handler <error> = method(condition, next-handler)
-                              if(*debugging?*)
-                                next-handler()
-                              else
-                                return()
-                              end;
-                            end;
+      let handler <error>
+        = method(condition, next-handler)
+              if(*debugging?*)
+                next-handler()
+              else
+                return()
+              end;
+          end;
       apply(func, args)
     end
   end
@@ -1013,7 +1016,7 @@
   set-frame-size(gui-sniffer, 1024, 768);
   deuce/frame-window(gui-sniffer) := gui-sniffer.packet-hex-dump;
   deuce/*editor-frame* := gui-sniffer;
-  deuce/*buffer* := deuce/make-initial-buffer(); //empty-buffer(<non-file-buffer>, name: "Network Night Vision", editor: frame-editor(gui-sniffer));
+  deuce/*buffer* := deuce/make-initial-buffer();
   deuce/select-buffer(frame-window(gui-sniffer), deuce/*buffer*);
   command-enabled?(close-interface, gui-sniffer) := #f;
   gadget-enabled?(gui-sniffer.stop-button) := #f;



More information about the chatter mailing list