diff options
| author | 2015-03-07 09:26:35 +0100 | |
|---|---|---|
| committer | 2015-03-07 09:26:35 +0100 | |
| commit | dfe781c30b2e189d4ba679e70a75d03f261c695c (patch) | |
| tree | 492759403de8b2ef5b60a0b8dc6f36bed37ac819 /app/Exceptions | |
| parent | 24f6c1eabb4cea941e40307c2f732c0ca384ffd2 (diff) | |
| parent | 32c439a5d6ae18249ce739a0b859a1c766510d1c (diff) | |
Merge pull request #804 from aledeg/refactor-exceptions
Refactor exceptions
Diffstat (limited to 'app/Exceptions')
| -rw-r--r-- | app/Exceptions/BadUrlException.php | 3 | ||||
| -rw-r--r-- | app/Exceptions/ContextException.php | 6 | ||||
| -rw-r--r-- | app/Exceptions/EntriesGetterException.php | 6 | ||||
| -rw-r--r-- | app/Exceptions/FeedException.php | 7 |
4 files changed, 10 insertions, 12 deletions
diff --git a/app/Exceptions/BadUrlException.php b/app/Exceptions/BadUrlException.php index 59574e1e5..d2509e4ba 100644 --- a/app/Exceptions/BadUrlException.php +++ b/app/Exceptions/BadUrlException.php @@ -1,6 +1,9 @@ <?php + class FreshRSS_BadUrl_Exception extends FreshRSS_Feed_Exception { + public function __construct($url) { parent::__construct('`' . $url . '` is not a valid URL'); } + } diff --git a/app/Exceptions/ContextException.php b/app/Exceptions/ContextException.php index 357751b7c..8f05eccd6 100644 --- a/app/Exceptions/ContextException.php +++ b/app/Exceptions/ContextException.php @@ -3,8 +3,6 @@ /** * An exception raised when a context is invalid */ -class FreshRSS_Context_Exception extends Exception { - public function __construct($message) { - parent::__construct($message); - } +class FreshRSS_Context_Exception extends \Exception { + } diff --git a/app/Exceptions/EntriesGetterException.php b/app/Exceptions/EntriesGetterException.php index 5f47c830b..8aace1840 100644 --- a/app/Exceptions/EntriesGetterException.php +++ b/app/Exceptions/EntriesGetterException.php @@ -1,7 +1,5 @@ <?php -class FreshRSS_EntriesGetter_Exception extends Exception { - public function __construct($message) { - parent::__construct($message); - } +class FreshRSS_EntriesGetter_Exception extends \Exception { + } diff --git a/app/Exceptions/FeedException.php b/app/Exceptions/FeedException.php index 2433b3964..6c0cb3755 100644 --- a/app/Exceptions/FeedException.php +++ b/app/Exceptions/FeedException.php @@ -1,6 +1,5 @@ <?php -class FreshRSS_Feed_Exception extends Exception { - public function __construct($message) { - parent::__construct($message); - } + +class FreshRSS_Feed_Exception extends \Exception { + } |
