--- a/SmallInteger.st Wed Aug 04 16:10:22 1999 +0200
+++ b/SmallInteger.st Wed Aug 04 16:10:55 1999 +0200
@@ -83,7 +83,9 @@
"return a bitmask for the index's bit (index starts at 1)"
(index between:1 and:SmallInteger maxBits) ifFalse:[
- ^ self error:'index out of bounds'
+ ^ SubscriptOutOfBoundsSignal
+ raiseRequestWith:index
+ errorString:'index out of bounds'
].
^ 1 bitShift:(index - 1)
! !
@@ -752,13 +754,15 @@
bitAt:index
"return the value of the index's bit (index starts at 1).
Notice: the result of bitAt: on negative receivers is not
- defined in the language standard (since the implementation
- is free to choose any internal representation for integers)"
+ defined in the language standard (since the implementation
+ is free to choose any internal representation for integers)"
|mask|
(index between:1 and:SmallInteger maxBits) ifFalse:[
- ^ self error:'index out of bounds'
+ ^ SubscriptOutOfBoundsSignal
+ raiseRequestWith:index
+ errorString:'index out of bounds'
].
mask := 1 bitShift:(index - 1).
((self bitAnd:mask) == 0) ifTrue:[^ 0].
@@ -2897,5 +2901,5 @@
!SmallInteger class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.115 1999-07-26 09:11:55 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.116 1999-08-04 14:10:55 cg Exp $'
! !