[Nostromo] Add Exception Listener for uncaught exceptions in Command, wrap Bin in exception for early errors.

This commit is contained in:
Andrés Montañez
2017-01-03 18:12:58 -03:00
parent 2c5e44ab1e
commit 886b7edcf6
2 changed files with 27 additions and 3 deletions
+8 -3
View File
@@ -10,6 +10,11 @@ if (file_exists(__DIR__ . '/../../../autoload.php')) {
use Mage\MageApplication;
$mage = new MageApplication();
$mage->configure('.mage.yml');
$mage->run();
try {
$mage = new MageApplication();
$mage->configure('.mage.yml');
$mage->run();
} catch (Exception $exception) {
printf('Error: %s' . PHP_EOL, $exception->getMessage());
exit(9);
}