@@ -7,7 +7,7 @@ export split_first, split_last, split_at, split_unaligned
77
88Return the first element of `v` and all other elements as a new memory view.
99
10- This function will throw a `BoundsError ` if `v` is empty.
10+ This function will throw a `LightBoundsError ` if `v` is empty.
1111
1212See also: [`split_last`](@ref)
1313
@@ -22,7 +22,9 @@ julia> split_first(v[1:1])
2222(0x01, UInt8[])
2323
2424julia> split_first(v[1:0])
25- ERROR: BoundsError: attempt to access 0-element MutableMemoryView{UInt8} at index [1]
25+ ERROR: LightBoundsErrors.LightBoundsError: out-of-bounds indexing: `collection[1]`, where:
26+ * `typeof(collection) == MutableMemoryView{UInt8}`
27+ * `axes(collection) == (Base.OneTo(0),)`
2628[...]
2729```
2830"""
3638
3739Return the last element of `v` and all other elements as a new memory view.
3840
39- This function will throw a `BoundsError ` if `v` is empty.
41+ This function will throw a `LightBoundsError ` if `v` is empty.
4042
4143See also: [`split_first`](@ref)
4244
@@ -51,7 +53,9 @@ julia> split_last(v[1:1])
5153(0x01, UInt8[])
5254
5355julia> split_last(v[1:0])
54- ERROR: BoundsError: attempt to access 0-element MutableMemoryView{UInt8} at index [1]
56+ ERROR: LightBoundsErrors.LightBoundsError: out-of-bounds indexing: `collection[1]`, where:
57+ * `typeof(collection) == MutableMemoryView{UInt8}`
58+ * `axes(collection) == (Base.OneTo(0),)`
5559[...]
5660```
5761"""
6670Split a memory view into two at an index.
6771
6872The first will contain all indices in `1:i-1`, the second `i:end`.
69- This function will throw a `BoundsError ` if `i` is not in `1:end+1`.
73+ This function will throw a `LightBoundsError ` if `i` is not in `1:end+1`.
7074
7175# Examples
7276```jldoctest
0 commit comments