bootstrapping: autoloader exceptions should not...

...require to be autoloaded.

refs #6411
This commit is contained in:
Thomas Gelf 2014-06-04 22:50:08 +00:00
parent 602b448505
commit a221afd933
1 changed files with 6 additions and 2 deletions

View File

@ -4,7 +4,7 @@
namespace Icinga\Application; namespace Icinga\Application;
use Icinga\Exception\ProgrammingError; use Exception;
class Loader class Loader
{ {
@ -39,7 +39,11 @@ class Loader
public function registerNamespace($namespace, $directory) public function registerNamespace($namespace, $directory)
{ {
if (!is_dir($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; $this->namespaces[$namespace] = $directory;