--- a/Block.st Sun Aug 07 21:29:56 1994 +0200
+++ b/Block.st Thu Aug 11 23:34:21 1994 +0200
@@ -23,7 +23,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libbasic/Block.st,v 1.17 1994-08-05 02:07:59 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Block.st,v 1.18 1994-08-11 21:34:21 claus Exp $
'!
!Block class methodsFor:'documentation'!
@@ -44,7 +44,7 @@
version
"
-$Header: /cvs/stx/stx/libbasic/Block.st,v 1.17 1994-08-05 02:07:59 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Block.st,v 1.18 1994-08-11 21:34:21 claus Exp $
"
!
@@ -201,11 +201,13 @@
!Block methodsFor:'error handling'!
-argumentCountError:numberGiven
+wrongNumberOfArguments:numberGiven
"report that the number of arguments given does not match the number expected"
- self error:('Block got ' , numberGiven printString ,
- ' args while ' , nargs printString , ' where expected')
+ ArgumentSignal
+ raiseRequestWith:self
+ errorString:('block got ' , numberGiven printString ,
+ ' args while ' , nargs printString , ' where expected')
!
invalidMethod
@@ -215,23 +217,9 @@
Can only happen when the Compiler/runtime system is broken or
someone played around."
- self error:'invalid block - not executable'
-!
-
-tooManySendArguments
- "this error is triggered, when a method tries to perform a send with
- more arguments than supported by the interpreter - this can only
- happen, if the compiler has been changed without updating the VM."
-
- self error:'too many send args - should not happen'
-!
-
-tooManyArguments
- "this error is triggered, when a method is called with more arguments
- than supported by the interpreter - this can only happen, if the
- compiler has been changed without updating the VM."
-
- self error:'block has too many args - should not happen'
+ InvalidCodeSignal
+ raiseRequestWith:self
+ errorString:'invalid block - not executable'
! !
!Block methodsFor:'evaluation'!
@@ -270,7 +258,7 @@
}
%}
.
- ^ self argumentCountError:0
+ ^ self wrongNumberOfArguments:0
!
value:arg
@@ -305,7 +293,7 @@
}
%}
.
- ^ self argumentCountError:1
+ ^ self wrongNumberOfArguments:1
!
value:arg1 value:arg2
@@ -338,7 +326,7 @@
}
%}
.
- ^ self argumentCountError:2
+ ^ self wrongNumberOfArguments:2
!
value:arg1 value:arg2 value:arg3
@@ -371,7 +359,7 @@
}
%}
.
- ^ self argumentCountError:3
+ ^ self wrongNumberOfArguments:3
!
value:arg1 value:arg2 value:arg3 value:arg4
@@ -404,7 +392,7 @@
}
%}
.
- ^ self argumentCountError:4
+ ^ self wrongNumberOfArguments:4
!
value:arg1 value:arg2 value:arg3 value:arg4 value:arg5
@@ -437,7 +425,7 @@
}
%}
.
- ^ self argumentCountError:5
+ ^ self wrongNumberOfArguments:5
!
value:arg1 value:arg2 value:arg3 value:arg4 value:arg5 value:arg6
@@ -470,7 +458,7 @@
}
%}
.
- ^ self argumentCountError:6
+ ^ self wrongNumberOfArguments:6
!
valueWithArguments:argArray
@@ -480,10 +468,10 @@
|a1 a2 a3 a4 a5 a6 a7|
(argArray class == Array) ifFalse:[
- ^ self error:'argument must be an array'
+ ^ self badArgumentArry
].
(argArray size == nargs) ifFalse:[
- ^ self argumentCountError:(argArray size)
+ ^ self wrongNumberOfArguments:(argArray size)
].
%{
@@ -535,7 +523,9 @@
error: ;
%}
.
- self error:'only blocks with up-to 7 arguments supported'
+ ArgumentSignal
+ raiseRequestWith:self
+ errorString:'only blocks with up-to 7 arguments supported'
!
valueNowOrOnUnwindDo:aBlock