Skip to content

Commit e07f521

Browse files
committed
ApplicationExtension: missing RobotLoader throws exception [Closes #78]
1 parent 80fde4d commit e07f521

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Bridges/ApplicationDI/ApplicationExtension.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ private function findPresenters()
123123
$classes = [];
124124

125125
if ($config['scanDirs']) {
126+
if (!class_exists('Nette\Loaders\RobotLoader')) {
127+
throw new Nette\NotSupportedException("RobotLoader is required to find presenters, install package `nette/robot-loader` or disable option {$this->prefix('scanDirs')}: false");
128+
}
126129
$robot = new Nette\Loaders\RobotLoader;
127130
$robot->setCacheStorage(new Nette\Caching\Storages\DevNullStorage);
128131
$robot->addDirectory($config['scanDirs']);

0 commit comments

Comments
 (0)