code: func checkErr(err error, handleErr func(string, int)) {
  	switch err.(type) {
  	case nil:
  		return
  	case preflightError:
  		handleErr(err.Error(), PreFlightExitCode)
  	case errorsutil.Aggregate:
  		handleErr(err.Error(), ValidationExitCode)
  
  	default:
  		handleErr(err.Error(), DefaultErrorExitCode)
  	}
  }
docs: // checkErr formats a given error as a string and calls the passed handleErr
  // func with that string and an exit code.