[][src]Function nagiosplugin::safe_run_with_state

pub fn safe_run_with_state<F: Fn() -> Result<(), Box<dyn Error>>>(
    closure: F,
    error_state: State
)

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