Skip to content

Commit

Permalink
exitcode 1 on exception in yii_test
Browse files Browse the repository at this point in the history
  • Loading branch information
rumours86 authored Jul 2, 2019
1 parent 45a6dce commit 97e9ec1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion environments/dev/yii_test
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* Yii console bootstrap file.
*/

use yii\console\ExitCode;

defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');

Expand All @@ -24,5 +26,10 @@ $config = yii\helpers\ArrayHelper::merge(
);

$application = new yii\console\Application($config);
$exitCode = $application->run();
try {
$exitCode = $application->run();
} catch (\Exception $exception) {
echo $exception;
$exitCode = ExitCode::UNSPECIFIED_ERROR;
}
exit($exitCode);

0 comments on commit 97e9ec1

Please sign in to comment.