Skip to content

Commit e70fcdb

Browse files
nsajkojakobnissen
authored andcommitted
update doc strings
1 parent 64a0edf commit e70fcdb

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

src/experimental.jl

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export split_first, split_last, split_at, split_unaligned
77
88
Return 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
1212
See also: [`split_last`](@ref)
1313
@@ -22,7 +22,9 @@ julia> split_first(v[1:1])
2222
(0x01, UInt8[])
2323
2424
julia> 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
"""
@@ -36,7 +38,7 @@ end
3638
3739
Return 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
4143
See also: [`split_first`](@ref)
4244
@@ -51,7 +53,9 @@ julia> split_last(v[1:1])
5153
(0x01, UInt8[])
5254
5355
julia> 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
"""
@@ -66,7 +70,7 @@ end
6670
Split a memory view into two at an index.
6771
6872
The 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

Comments
 (0)