Skip to content

Commit

Permalink
Catch exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk authored and yunosh committed Mar 19, 2015
1 parent 66912b3 commit a72b73b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion kronolith/data.php
Expand Up @@ -199,7 +199,14 @@

if (!empty($ical)) {
$ical_importer = new Kronolith_Icalendar_Handler_Base($ical, $kronolith_driver);
$ical_importer->process();
try {
$ical_importer->process();
} catch (Kronolith_Exception $e) {
$msg = _("Can't create a new event.")
. ' ' . sprintf(_("This is what the server said: %s"), $e->getMessage());
$notification->push($msg, 'horde.error');
$error = true;
}
}

if (!$error) {
Expand Down

0 comments on commit a72b73b

Please sign in to comment.