pub fn update_last_error(err: Error) {
    {
        // Print a pseudo-backtrace for this error, following back each error's
        // cause until we reach the root error.
        let mut cause = err.as_fail().cause();
        while let Some(parent_err) = cause {
            cause = parent_err.cause();
        }
    }

    LAST_ERROR.with(|prev| {
        *prev.borrow_mut() = Some(Box::new(err));
    });
}
/// Update the most recent error, clearing whatever may have been there before.
Update the most recent error, clearing whatever may have been there before.
Update the most recent error clearing whatever may have been there before .
pub fn update_last_error(err: Error) {
    {
        // Print a pseudo-backtrace for this error, following back each error's
        // cause until we reach the root error.
        let mut cause = err.as_fail().cause();
        while let Some(parent_err) = cause {
            cause = parent_err.cause();
        }
    }
    LAST_ERROR.with(|prev| {
        *prev.borrow_mut() = Some(Box::new(err));
    });
}
pub fn update_last_error ( err : Error ) { { // Print a pseudo-backtrace for this error, following back each error's // cause until we reach the root error. let mut cause = err . as_fail ( ) . cause ( ) ; while let Some ( parent_err ) = cause { cause = parent_err . cause ( ) ; } } LAST_ERROR . with ( | prev | { * prev . borrow_mut ( ) = Some ( Box :: new ( err ) ) ; } ) ; }
Update the most recent error, clearing whatever may have been there before.
Update the most recent error clearing whatever may have been there before .
err
Error
err
Error