mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-02-03 01:07:37 +01:00
catch and report errors thrown at obtaining phone numbers and emails
This commit is contained in:
parent
71d40b0e08
commit
2606456255
@ -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()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user