Suppress Google Syncing exception whenever a Google Calendar event is not found.

This commit is contained in:
alext 2017-06-23 09:53:22 +02:00
parent aff86bd021
commit 1e88d37879
1 changed files with 10 additions and 2 deletions

View File

@ -231,7 +231,11 @@ class Google_Sync {
* be deleted.
*/
public function delete_appointment($provider, $google_event_id) {
try {
$this->service->events->delete($provider['settings']['google_calendar'], $google_event_id);
} catch (Exception $ex) {
// Event was not found on Google Calendar.
}
}
/**
@ -299,7 +303,11 @@ class Google_Sync {
* @param string $google_event_id Google Calendar event id to be deleted.
*/
public function delete_unavailable($provider, $google_event_id) {
try {
$this->service->events->delete($provider['settings']['google_calendar'], $google_event_id);
} catch (Exception $ex) {
// Event was not found on Google Calendar.
}
}
/**