slice-errors now report the parameters to the slicing operation
parent
2cbc979460
commit
d504d6b8de
|
@ -206,9 +206,8 @@ M: no-cond summary
|
|||
M: no-case summary
|
||||
drop "Fall-through in case" ;
|
||||
|
||||
M: slice-error error.
|
||||
"Cannot create slice because " write
|
||||
reason>> print ;
|
||||
M: slice-error summary
|
||||
drop "Cannot create slice" ;
|
||||
|
||||
M: bounds-error summary drop "Sequence index out of bounds" ;
|
||||
|
||||
|
|
|
@ -190,7 +190,7 @@ TUPLE: slice
|
|||
: collapse-slice ( m n slice -- m' n' seq )
|
||||
[ from>> ] [ seq>> ] bi >r tuck + >r + r> r> ; inline
|
||||
|
||||
ERROR: slice-error reason ;
|
||||
ERROR: slice-error from to seq reason ;
|
||||
|
||||
: check-slice ( from to seq -- from to seq )
|
||||
pick 0 < [ "start < 0" slice-error ] when
|
||||
|
|
Loading…
Reference in New Issue