rafaqz / DimensionalData.jl

Named dimensions and indexing for julia arrays and other data
https://rafaqz.github.io/DimensionalData.jl/stable/
MIT License
269 stars 37 forks source link

add a custom `SelectorError`exception #561

Closed rafaqz closed 9 months ago

rafaqz commented 9 months ago

This PR adds a custom SelectorError so we get a little more information than a BoundsError - it shows the selector used, its value, and the lookup bounds (for ordered lookups) or lookup values (for unordered and categorical lookups).

This is a start on adding more helpful custom errors to DD.

codecov-commenter commented 9 months ago

Codecov Report

Merging #561 (c3d8cb6) into main (67394b2) will decrease coverage by 0.10%. Report is 1 commits behind head on main. The diff coverage is 54.54%.

@@            Coverage Diff             @@
##             main     #561      +/-   ##
==========================================
- Coverage   88.03%   87.94%   -0.10%     
==========================================
  Files          40       40              
  Lines        3327     3335       +8     
==========================================
+ Hits         2929     2933       +4     
- Misses        398      402       +4     
Files Coverage Δ
src/LookupArrays/selector.jl 86.82% <54.54%> (-1.01%) :arrow_down:

... and 3 files with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

rafaqz commented 9 months ago

Apparently changing error types is not a breaking change, so this will be a patch version.