diff options
Diffstat (limited to 'app/Exceptions')
| -rw-r--r-- | app/Exceptions/AlreadySubscribedException.php | 14 | ||||
| -rw-r--r-- | app/Exceptions/FeedNotAddedException.php | 14 | ||||
| -rw-r--r-- | app/Exceptions/ZipException.php | 14 | ||||
| -rw-r--r-- | app/Exceptions/ZipMissingException.php | 4 |
4 files changed, 46 insertions, 0 deletions
diff --git a/app/Exceptions/AlreadySubscribedException.php b/app/Exceptions/AlreadySubscribedException.php new file mode 100644 index 000000000..33b9f9555 --- /dev/null +++ b/app/Exceptions/AlreadySubscribedException.php @@ -0,0 +1,14 @@ +<?php + +class FreshRSS_AlreadySubscribed_Exception extends Exception { + private $feedName = ''; + + public function __construct($url, $feedName) { + parent::__construct('Already subscribed! ' . $url, 2135); + $this->feedName = $feedName; + } + + public function feedName() { + return $this->feedName; + } +} diff --git a/app/Exceptions/FeedNotAddedException.php b/app/Exceptions/FeedNotAddedException.php new file mode 100644 index 000000000..350a17c56 --- /dev/null +++ b/app/Exceptions/FeedNotAddedException.php @@ -0,0 +1,14 @@ +<?php + +class FreshRSS_FeedNotAdded_Exception extends Exception { + private $feedName = ''; + + public function __construct($url, $feedName) { + parent::__construct('Feed not added! ' . $url, 2147); + $this->feedName = $feedName; + } + + public function feedName() { + return $this->feedName; + } +} diff --git a/app/Exceptions/ZipException.php b/app/Exceptions/ZipException.php new file mode 100644 index 000000000..8441daedf --- /dev/null +++ b/app/Exceptions/ZipException.php @@ -0,0 +1,14 @@ +<?php + +class FreshRSS_Zip_Exception extends Exception { + private $zipErrorCode = 0; + + public function __construct($zipErrorCode) { + parent::__construct('ZIP error! ' . $url, 2141); + $this->zipErrorCode = $zipErrorCode; + } + + public function zipErrorCode() { + return $this->zipErrorCode; + } +} diff --git a/app/Exceptions/ZipMissingException.php b/app/Exceptions/ZipMissingException.php new file mode 100644 index 000000000..864cc3991 --- /dev/null +++ b/app/Exceptions/ZipMissingException.php @@ -0,0 +1,4 @@ +<?php + +class FreshRSS_ZipMissing_Exception extends Exception { +} |
