Log exceptions when saving preferences

This commit is contained in:
Eric Lippmann 2014-10-30 09:48:25 +01:00
parent 39729c9580
commit c4554ac692

View File

@ -6,14 +6,15 @@ namespace Icinga\Form;
use Exception; use Exception;
use DateTimeZone; use DateTimeZone;
use Icinga\Web\Form; use Icinga\Logger\Logger;
use Icinga\Web\Request;
use Icinga\Web\Session;
use Icinga\Web\Notification;
use Icinga\Util\Translator;
use Icinga\Util\TimezoneDetect;
use Icinga\User\Preferences; use Icinga\User\Preferences;
use Icinga\User\Preferences\PreferencesStore; use Icinga\User\Preferences\PreferencesStore;
use Icinga\Util\TimezoneDetect;
use Icinga\Util\Translator;
use Icinga\Web\Form;
use Icinga\Web\Notification;
use Icinga\Web\Request;
use Icinga\Web\Session;
/** /**
* Form class to adjust user preferences * Form class to adjust user preferences
@ -108,6 +109,7 @@ class PreferenceForm extends Form
$this->save(); $this->save();
Notification::success(t('Preferences successfully saved')); Notification::success(t('Preferences successfully saved'));
} catch (Exception $e) { } catch (Exception $e) {
Logger::error($e);
Notification::error($e->getMessage()); Notification::error($e->getMessage());
} }
} }