handleCommandFailure function

Never handleCommandFailure(
  1. Object error,
  2. StackTrace stackTrace
)

Implementation

Never handleCommandFailure(Object error, StackTrace stackTrace) {
  if (error is AuthCliFault) {
    AppLogger.error(error.message);
    exit(error.exitCode);
  }
  if (error is DioException) {
    AppLogger.error('Network error: ${error.message}');
    exit(ExitCodes.usage);
  }
  Error.throwWithStackTrace(error, stackTrace);
}