FileReaderException: extend IcingaException
This commit is contained in:
parent
c4d17a3509
commit
3ade6da44d
|
@ -2,9 +2,9 @@
|
|||
|
||||
namespace Icinga\Protocol\File;
|
||||
|
||||
use RuntimeException;
|
||||
use Icinga\Exception\IcingaException;
|
||||
|
||||
/**
|
||||
* 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) {
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue