throwException method

void throwException (
  1. String error
)

Implementation

static void throwException(String error) {
  var listErrors = AuthExceptionMap.mapErrorMessages;

  for (var mapError in listErrors.entries) {
    if (error.contains(mapError.key)) {
      throw AuthException(error: mapError.key, message: mapError.value);
    }
  }

  throw Exception(error.toString());
}