Notify user when an error occurs

https://github.com/SimpleMobileTools/Simple-Calendar/issues/1601
This commit is contained in:
Naveen
2022-08-03 23:33:56 +05:30
parent b2d3ae45e6
commit 61d246985d

View File

@@ -152,7 +152,8 @@ class CalDAVHelper(val context: Context) {
val existingEvents = try { val existingEvents = try {
context.eventsDB.getEventsFromCalDAVCalendar("$CALDAV-$calendarId") context.eventsDB.getEventsFromCalDAVCalendar("$CALDAV-$calendarId")
} catch (e: Exception) { } catch (e: Exception) {
ArrayList() context.showErrorToast(context.getString(R.string.unknown_error_occurred))
return
} }
existingEvents.forEach { existingEvents.forEach {