Signal.st
changeset 95 d22739a0c6e9
parent 88 81dacba7a63a
child 120 9a2e74ed2f81
--- a/Signal.st	Fri Aug 05 03:03:07 1994 +0200
+++ b/Signal.st	Fri Aug 05 03:03:10 1994 +0200
@@ -21,6 +21,8 @@
 Signal comment:'
 COPYRIGHT (c) 1993 by Claus Gittinger
               All Rights Reserved
+
+$Header: /cvs/stx/stx/libbasic/Signal.st,v 1.11 1994-08-05 01:02:32 claus Exp $
 '!
 
 !Signal class methodsFor:'documentation'!
@@ -41,7 +43,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/Signal.st,v 1.10 1994-06-02 16:22:04 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Signal.st,v 1.11 1994-08-05 01:02:32 claus Exp $
 "
 !
 
@@ -190,13 +192,36 @@
      aBlock."
 
      ^ aBlock value  "the real logic is in raise/Exception"
+
+      "
+       Object messageNotUnderstoodSignal handle:[:ex |
+
+          'oops' printNL.
+          ex return
+       ] do:[
+          123 size open   
+       ]
+      "
+      "
+       |num|
+
+       num := 0.
+       Number divisionByZeroSignal handle:[:ex |
+
+          'oops' printNL.
+          ex return
+       ] do:[
+          123 / num   
+       ]
+      "
 !
 
 catch:aBlock
      "evaluate the argument, aBlock; return false.
       If the receiver-signal is raised during evaluation, abort
-      the evaluation and return true. This is the catch & throw
-      mechanism found in other languages."
+      the evaluation and return true. 
+      This is the catch & throw mechanism found in other languages,
+      where the returned value indicates if an exception occured."
 
       |raiseOccurred|
 
@@ -206,7 +231,7 @@
 
       "
        Object messageNotUnderstoodSignal catch:[
-          123 asciiValue   
+          123 size open   
        ]
       "
 ! !