FileReaderException: extend IcingaException

This commit is contained in:
Alexander Klimov 2014-09-03 11:12:15 +02:00
parent c4d17a3509
commit 3ade6da44d
2 changed files with 3 additions and 3 deletions

View File

@ -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 {}

View File

@ -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;