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:
@@ -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));
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user