mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 23:34:08 +02:00
FileReaderException: extend IcingaException
This commit is contained in:
parent
c4d17a3509
commit
3ade6da44d
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
namespace Icinga\Protocol\File;
|
namespace Icinga\Protocol\File;
|
||||||
|
|
||||||
use RuntimeException;
|
use Icinga\Exception\IcingaException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Exception thrown if a file reader specific error occurs
|
* Exception thrown if a file reader specific error occurs
|
||||||
*/
|
*/
|
||||||
class FileReaderException extends RuntimeException {}
|
class FileReaderException extends IcingaException {}
|
||||||
|
@ -40,7 +40,7 @@ class Reader extends FilterIterator
|
|||||||
{
|
{
|
||||||
foreach (array('filename', 'fields') as $key) {
|
foreach (array('filename', 'fields') as $key) {
|
||||||
if (! isset($config->{$key})) {
|
if (! isset($config->{$key})) {
|
||||||
throw new FileReaderException('The directive `' . $key . '\' is required');
|
throw new FileReaderException('The directive `%s\' is required', $key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->fields = $config->fields;
|
$this->fields = $config->fields;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user