pub(crate) fn record_shutdown_error( first_error: &mut Option<Error>, result: Result<()>, )
Keeps the first shutdown error and logs the later ones.