out_of_bounds_error

Macro out_of_bounds_error 

macro_rules! out_of_bounds_error {
    () => { ... };
}
Expand description

Helper macro for creating out-of-bounds errors with source location information.

This macro simplifies the creation of crate::Error::OutOfBounds errors by automatically capturing the current file and line number where the out-of-bounds access was detected.

§Returns

Returns a crate::Error::OutOfBounds variant with automatically captured source location information for debugging purposes.

§Examples

// Replace: Err(Error::OutOfBounds)
// With:    Err(out_of_bounds_error!())
if index >= data.len() {
    return Err(out_of_bounds_error!());
}