Function nagiosplugin::safe_run_with_state_sync[][src]

pub fn safe_run_with_state_sync<F>(f: F, error_state: State) where
    F: FnOnce() -> Result<(), Box<dyn Error>>, 

Runs the given closure and exits with the given State after printing out the error message if the Result contains an Err.