Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…alendarSync into release

Resolves #1060
  • Loading branch information
phw198 committed Nov 28, 2020
2 parents 11f3aa2 + 6c090b3 commit 705119f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/OutlookGoogleCalendarSync/GoogleOgcs/GoogleCalendar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,13 @@ public void DeleteCalendarEntries(List<Event> events) {
if (doDelete) deleteCalendarEntry_save(ev);
else events.Remove(ev);
} catch (System.Exception ex) {
if (ex is Google.GoogleApiException) {
Google.GoogleApiException gex = ex as Google.GoogleApiException;
if (gex.Error != null && gex.Error.Code == 410) { //Resource has been deleted
log.Fail("This event is already deleted! Ignoring failed request to delete.");
continue;
}
}
Forms.Main.Instance.Console.UpdateWithError(GoogleOgcs.Calendar.GetEventSummary(ev, true) + "Deleted event failed to remove.", ex);
OGCSexception.Analyse(ex, true);
if (OgcsMessageBox.Show("Deleted Google event failed to remove. Continue with synchronisation?", "Sync item failed", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
Expand Down

0 comments on commit 705119f

Please sign in to comment.