aboutsummaryrefslogtreecommitdiff
path: root/app/Exceptions
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-10-30 20:15:11 +0100
committerGravatar GitHub <noreply@github.com> 2016-10-30 20:15:11 +0100
commit1d3e5bdee069434fd65c2717ae8fcce8c54fe81d (patch)
tree39b0ae9ac0b0d1ed7fa11c747a0523cb3faa384b /app/Exceptions
parent17c8c039df675b3b0f8d88d14f7316a240eabe76 (diff)
parent29e1f048159b7a580bdf1bab184e928f11d104b4 (diff)
Merge pull request #1346 from FreshRSS/dev1.6.0
Merge 1.6.0-dev in master
Diffstat (limited to 'app/Exceptions')
-rw-r--r--app/Exceptions/AlreadySubscribedException.php14
-rw-r--r--app/Exceptions/FeedNotAddedException.php14
-rw-r--r--app/Exceptions/ZipException.php14
-rw-r--r--app/Exceptions/ZipMissingException.php4
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 {
+}