From 1bbd07efe1ac5cd498d30b720b079eb7c3d0ad3c Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Wed, 21 Oct 2015 07:45:08 +0200 Subject: [PATCH] Import: use IcingaException, add a TODO --- library/Director/Import/Import.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/library/Director/Import/Import.php b/library/Director/Import/Import.php index bebec603..573b426e 100644 --- a/library/Director/Import/Import.php +++ b/library/Director/Import/Import.php @@ -5,6 +5,7 @@ namespace Icinga\Module\Director\Import; use Icinga\Module\Director\Objects\ImportSource; use Icinga\Module\Director\Util; use Icinga\Module\Director\Web\Hook\ImportSourceHook; +use Icinga\Exception\IcingaException; class Import { @@ -33,13 +34,12 @@ class Import foreach (ImportSourceHook::loadByName($source->source_name, $connection)->fetchData() as $row) { // TODO: Check for name collision if (! isset($row->$keyColumn)) { -continue; - throw new \Exception( - sprintf( - 'No key column "%s" in row: %s', - $keyColumn, - json_encode($row) - ) + // TODO: re-enable errors + continue; + throw new IcingaException( + 'No key column "%s" in row: %s', + $keyColumn, + json_encode($row) ); }