The following code:
Throws the following error:
invalid call of the function arraySlice, third Argument (length) is invalid, Offset+length cannot be greater than size of the array
However, this is incorrect as the length argument is not the issue. And furthermore, the offset+length is not larger than the array. The offset argument is the issue as it cannot be zero.
Adobe ColdFusion does not have this issue as their error message makes a lot more sense:
The array has 5 indexes. Valid positions are from 1 to 5.
Cannot access array element at position 0.