Commit fadc23a3 by Carsten Brandt

improved erorr handling in api doc controller

parent ee1488a6
...@@ -44,6 +44,9 @@ class RenderController extends Controller ...@@ -44,6 +44,9 @@ class RenderController extends Controller
} }
$renderer = $this->findRenderer(); $renderer = $this->findRenderer();
if ($renderer === false) {
return 1;
}
$renderer->targetDir = $targetDir; $renderer->targetDir = $targetDir;
$this->stdout('Searching files to process... '); $this->stdout('Searching files to process... ');
...@@ -106,7 +109,7 @@ class RenderController extends Controller ...@@ -106,7 +109,7 @@ class RenderController extends Controller
$rendererClass = 'yii\\apidoc\\templates\\' . $this->template . '\\Renderer'; $rendererClass = 'yii\\apidoc\\templates\\' . $this->template . '\\Renderer';
if (!class_exists($rendererClass)) { if (!class_exists($rendererClass)) {
$this->stderr('Renderer not found.' . PHP_EOL); $this->stderr('Renderer not found.' . PHP_EOL);
exit(0); return false;
} }
return new $rendererClass(); return new $rendererClass();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment