1
0
mirror of https://github.com/Chouchen/ShikiryuRSS.git synced 2026-05-30 01:49:05 +02:00

Add new exceptions

This commit is contained in:
Shikiryu
2023-04-12 00:27:35 +02:00
parent f1816dec0c
commit cb6fff0dae
8 changed files with 109 additions and 17 deletions
@@ -0,0 +1,12 @@
<?php
namespace Shikiryu\SRSS\Exception;
class ChannelNotFoundInRSSException extends SRSSException
{
public function __construct($file)
{
parent::__construct(sprintf('Invalid file `%s`: <channel> not found', $file));
}
}
@@ -0,0 +1,15 @@
<?php
namespace Shikiryu\SRSS\Exception;
class PropertyNotFoundException extends SRSSException
{
/**
* @param string $class
* @param string $name
*/
public function __construct($class, $name)
{
parent::__construct(sprintf('Property `%s` not found in `%s`', $name, $class));
}
}
+12
View File
@@ -0,0 +1,12 @@
<?php
namespace Shikiryu\SRSS\Exception;
class UnreadableRSSException extends SRSSException
{
public function __construct($file)
{
parent::__construct(sprintf('File `%s` is unreadable.', $file));
}
}