From 3ade6da44dc5eb7197de1cce3a75178e30b9529a Mon Sep 17 00:00:00 2001 From: Alexander Klimov Date: Wed, 3 Sep 2014 11:12:15 +0200 Subject: [PATCH] FileReaderException: extend IcingaException --- .../Icinga/Protocol/File/Exception/FileReaderException.php | 4 ++-- library/Icinga/Protocol/File/Reader.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library/Icinga/Protocol/File/Exception/FileReaderException.php b/library/Icinga/Protocol/File/Exception/FileReaderException.php index 3e0890a57..a7db5d701 100644 --- a/library/Icinga/Protocol/File/Exception/FileReaderException.php +++ b/library/Icinga/Protocol/File/Exception/FileReaderException.php @@ -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 {} diff --git a/library/Icinga/Protocol/File/Reader.php b/library/Icinga/Protocol/File/Reader.php index 50842bc4a..651846b58 100644 --- a/library/Icinga/Protocol/File/Reader.php +++ b/library/Icinga/Protocol/File/Reader.php @@ -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;