From a221afd9333d89c5a9f3f7e44776f8a4d80b351f Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Wed, 4 Jun 2014 22:50:08 +0000 Subject: [PATCH] bootstrapping: autoloader exceptions should not... ...require to be autoloaded. refs #6411 --- library/Icinga/Application/Loader.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/library/Icinga/Application/Loader.php b/library/Icinga/Application/Loader.php index 9cb74a167..4bc93f06a 100644 --- a/library/Icinga/Application/Loader.php +++ b/library/Icinga/Application/Loader.php @@ -4,7 +4,7 @@ namespace Icinga\Application; -use Icinga\Exception\ProgrammingError; +use Exception; class Loader { @@ -39,7 +39,11 @@ class Loader public function registerNamespace($namespace, $directory) { if (!is_dir($directory)) { - throw new ProgrammingError('Directory does not exist: ' . $directory); + throw new Exception(sprintf( + 'Namespace directory "%s" for "%s" does not exist', + $namespace, + $directory + )); } $this->namespaces[$namespace] = $directory;