fn opt_err_to_result(e: Option<Error>) -> Result<()>
If err is some, return Err(err). Otherwise return Ok(()).
err
Err(err)