Skip to main content

error_chain_with_limit

Function error_chain_with_limit 

pub fn error_chain_with_limit<'a>(
    error: &'a (dyn Error + 'static),
    max_depth: usize,
) -> impl Iterator<Item = &'a (dyn Error + 'static)>
Expand description

Iterate over an error and its sources, visiting at most max_depth errors.

The supplied error counts toward the limit. A zero limit yields no items. Otherwise this behaves like error_chain, with an explicit traversal bound.