mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
catch and report errors thrown at obtaining phone numbers and emails
This commit is contained in:
@ -117,6 +117,8 @@ class ContactsHelper(val activity: BaseSimpleActivity) {
|
||||
phoneNumbers[id].add(phoneNumber)
|
||||
} while (cursor.moveToNext())
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
activity.showErrorToast(e)
|
||||
} finally {
|
||||
cursor?.close()
|
||||
}
|
||||
@ -151,6 +153,9 @@ class ContactsHelper(val activity: BaseSimpleActivity) {
|
||||
emails[id]!!.add(Email(email, type))
|
||||
} while (cursor.moveToNext())
|
||||
}
|
||||
|
||||
} catch (e: Exception) {
|
||||
activity.showErrorToast(e)
|
||||
} finally {
|
||||
cursor?.close()
|
||||
}
|
||||
|
Reference in New Issue
Block a user