Block.st
branchjv
changeset 17815 956b46750806
parent 17814 b75a7f0c346b
child 17834 04ff72c5039a
--- a/Block.st	Mon Dec 20 07:13:27 2010 +0000
+++ b/Block.st	Fri Feb 04 23:09:23 2011 +0000
@@ -554,6 +554,7 @@
     "Created: / 28-08-2010 / 14:41:15 / cg"
 ! !
 
+
 !Block methodsFor:'accessing'!
 
 home
@@ -611,6 +612,7 @@
     ^ nargs
 ! !
 
+
 !Block methodsFor:'compatibility-Cola & Pepsi'!
 
 arity
@@ -2019,27 +2021,44 @@
      exceptionBlock's value is returned. The receiver's code must be prepared
      for premature returning (by adding ensure blocks, as required)"
 
-    |showStopper me retVal done|
+    |showStopper me retVal done inError|
 
     done := false.
     me := Processor activeProcess.
 
-    showStopper := [ done ifFalse:[ me interruptWith:[ done ifFalse:[ TimeoutNotification raiseRequest ]] ]].
+    showStopper := 
+        [ 
+            done ifFalse:[ 
+                me interruptWith:[
+                    (Processor activeProcess state ~~ #debug) ifTrue:[
+                        done ifFalse:[ TimeoutNotification raiseRequest ]
+                    ]
+                ] 
+            ]
+        ].
 
     TimeoutNotification handle:[:ex |
+        inError ifTrue:[
+            ex proceed
+        ].
         retVal := exceptionBlock value.
     ] do:[
-        [
-            Processor 
-                addTimedBlock:showStopper 
-                for:me 
-                afterMilliseconds:aTimeLimit.
-
-            retVal := self value.
-            done := true.
-        ] ensure:[ 
-            Processor removeTimedBlock:showStopper 
-        ].
+        NoHandlerError handle:[:ex |
+            inError := true.
+            ex reject.
+        ] do:[
+            [
+                Processor 
+                    addTimedBlock:showStopper 
+                    for:me 
+                    afterMilliseconds:aTimeLimit.
+
+                retVal := self value.
+                done := true.
+            ] ensure:[ 
+                Processor removeTimedBlock:showStopper 
+            ].
+        ]
     ].
     ^ retVal
 
@@ -2051,7 +2070,7 @@
     "
 
     "Modified: / 21-05-2010 / 12:19:57 / sr"
-    "Modified: / 20-08-2010 / 12:16:58 / cg"
+    "Modified: / 18-01-2011 / 19:24:13 / cg"
 ! !
 
 !Block methodsFor:'exception handling private'!
@@ -2931,15 +2950,15 @@
 !Block class methodsFor:'documentation'!
 
 version
-    ^ '$Id: Block.st 10602 2010-12-20 07:13:27Z vranyj1 $'
+    ^ '$Id: Block.st 10604 2011-02-04 23:09:23Z vranyj1 $'
 !
 
 version_CVS
-    ^ 'Header: /cvs/stx/stx/libbasic/Block.st,v 1.183 2010/09/05 16:08:19 cg Exp '
+    ^ 'Header: /cvs/stx/stx/libbasic/Block.st,v 1.184 2011/01/18 18:24:31 cg Exp '
 !
 
 version_SVN
-    ^ '$Id: Block.st 10602 2010-12-20 07:13:27Z vranyj1 $'
+    ^ '$Id: Block.st 10604 2011-02-04 23:09:23Z vranyj1 $'
 ! !
 
 Block initialize!
@@ -2952,3 +2971,4 @@
 
 
 
+