diff --git a/lib/helpers/users_helper.dart b/lib/helpers/users_helper.dart index c18d359..1e9e517 100644 --- a/lib/helpers/users_helper.dart +++ b/lib/helpers/users_helper.dart @@ -63,6 +63,19 @@ class UsersHelper { return list; } + /// Get users information from a given [Set]. Throws an exception in case + /// of failure + Future getListWithThrow(Set users, + {bool forceDownload = false}) async { + final list = await getUsersInfo(users.toList()); + + if (list == null) + throw Exception( + "Could not get information about the given list of users!"); + + return list; + } + /// Get users information from a given [Set] Future getList(Set users, {bool forceDownload = false}) async {