check for nil signal in #handle:do:
otherwise, we get a recursive error in the handler, when it
tries to send it #accepts:
--- a/Block.st Thu Aug 23 23:00:58 2001 +0200
+++ b/Block.st Thu Aug 23 23:03:04 2001 +0200
@@ -496,6 +496,15 @@
^ nargs
! !
+!Block methodsFor:'binary storage'!
+
+storeBinaryDefinitionOn:stream manager:manager
+ byteCode isNil ifTrue:[
+ self halt:'cannot preserve semantics of block'.
+ ].
+ ^ super storeBinaryDefinitionOn:stream manager:manager
+! !
+
!Block methodsFor:'conversion'!
asVarArgBlock
@@ -1123,6 +1132,11 @@
theContext selector == #on:do: ifTrue:[
sig := theContext argAt:1.
+ sig isNil ifTrue:[
+ 'oops - nil arg in on:do:-context (undefined Exception)' errorPrintCR.
+ theContext fullPrint.
+ ^ nil.
+ ].
(sig == signal or:[sig accepts:signal]) ifTrue:[
handler := theContext argAt:2.
"/ this is for backward compatibility when no ex-arg
@@ -1778,6 +1792,6 @@
!Block class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Block.st,v 1.101 2001-01-10 12:52:25 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Block.st,v 1.102 2001-08-23 21:03:04 cg Exp $'
! !
Block initialize!