From 1b2b6a66c5a4202c1774724ad7adc2fcdb5f7b3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no> Date: Tue, 9 Dec 2008 06:37:11 +0000 Subject: [PATCH] only report errors from statistics cron hook git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1058 44740490-163a-0410-bde0-09ae8108e29a --- modules/statistics/hooks/hook_cron.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/statistics/hooks/hook_cron.php b/modules/statistics/hooks/hook_cron.php index cda5b4176..cd0edc555 100644 --- a/modules/statistics/hooks/hook_cron.php +++ b/modules/statistics/hooks/hook_cron.php @@ -15,9 +15,10 @@ function statistics_hook_cron(&$croninfo) { if (is_null($statconfig->getValue('cron_tag', NULL))) return; if ($statconfig->getValue('cron_tag', NULL) !== $croninfo['tag']) return; - require_once(SimpleSAML_Module::getModuleDir('statistics') . '/extlibs/loganalyzer.php'); - - $croninfo['summary'][] = 'Loganalyzer did run'; - + try { + require_once(SimpleSAML_Module::getModuleDir('statistics') . '/extlibs/loganalyzer.php'); + } catch (Exception $e) { + $croninfo['summary'][] = 'Loganalyzer threw exception: ' . $e->getMessage(); + } } ?> \ No newline at end of file -- GitLab