Commit 214f66a8 by Carsten Brandt
parent 7e807206
......@@ -515,7 +515,7 @@ abstract class Application extends Module
$handler->handle($exception);
} else {
echo $this->renderException($exception);
if (PHP_SAPI === 'cli') {
if (PHP_SAPI === 'cli' && !YII_ENV_TEST) {
exit(1);
}
}
......
......@@ -87,7 +87,10 @@ class ErrorHandler extends Component
{
if (Yii::$app instanceof \yii\console\Application || YII_ENV_TEST) {
echo Yii::$app->renderException($exception);
exit(1);
if (!YII_ENV_TEST) {
exit(1);
}
return;
}
$useErrorView = !YII_DEBUG || $exception instanceof UserException;
......
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