Skip to content

Commit

Permalink
Catch exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Mar 18, 2015
1 parent 4e77e27 commit e8aa31d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion kronolith/data.php
Expand Up @@ -216,7 +216,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 e8aa31d

Please sign in to comment.