aboutsummaryrefslogtreecommitdiff
path: root/model/Schedule.php
diff options
context:
space:
mode:
authorMaZderMind2015-04-03 10:29:50 +0200
committerMaZderMind2015-04-03 10:30:23 +0200
commitf31ab92466b039b373d56b77f9f9796a1222cb38 (patch)
treedd7aa69052e1e579681540956cc98c627cc4e369 /model/Schedule.php
parentae76dc32ef5863a7e3e932c6f5373832601702ee (diff)
Fail gracefully when the Schedule is unreachable
Diffstat (limited to 'model/Schedule.php')
-rw-r--r--model/Schedule.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/model/Schedule.php b/model/Schedule.php
index 86fddcf..42849d1 100644
--- a/model/Schedule.php
+++ b/model/Schedule.php
@@ -46,7 +46,14 @@ class Schedule extends ModelBase
return $schedule;
// download schedule-xml
- $schedule = $this->fetchSchedule();
+ try
+ {
+ $schedule = $this->fetchSchedule();
+ }
+ catch(Exception $e)
+ {
+ return array();
+ }
$mapping = $this->getScheduleToRoomSlugMapping();
$program = array();