diff options
Diffstat (limited to 'app/models')
| -rw-r--r-- | app/models/Exception/FeedException.php | 7 | ||||
| -rw-r--r-- | app/models/Feed.php | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/app/models/Exception/FeedException.php b/app/models/Exception/FeedException.php new file mode 100644 index 000000000..3fe0f4ea0 --- /dev/null +++ b/app/models/Exception/FeedException.php @@ -0,0 +1,7 @@ +<?php + +class FeedException extends Exception { + public function __construct ($message) { + parent::__construct ($message); + } +} diff --git a/app/models/Feed.php b/app/models/Feed.php index b619aaa97..da75ae8c8 100644 --- a/app/models/Feed.php +++ b/app/models/Feed.php @@ -128,6 +128,10 @@ class Feed extends Model { $feed->set_cache_location (CACHE_PATH); $feed->init (); + if ($feed->error()) { + throw new FeedException ($feed->error); + } + $subscribe_url = $feed->subscribe_url (); if (!is_null ($subscribe_url) && $subscribe_url != $this->url) { $this->_url ($subscribe_url); |
