improve reported exceptions

This commit is contained in:
TomasVotruba 2017-09-28 20:01:15 +02:00
parent e358f71b77
commit 0cbb076b9e
2 changed files with 6 additions and 2 deletions

View File

@ -33,6 +33,11 @@ try {
exit($statusCode);
} catch (Throwable $throwable) {
$symfonyStyle = SymfonyStyleFactory::create();
$symfonyStyle->error($throwable->getMessage());
$symfonyStyle->error(sprintf(
'%s in %s on line %d',
$throwable->getMessage(),
$throwable->getFile(),
$throwable->getLine()
));
exit(1);
}

View File

@ -2,7 +2,6 @@ services:
_defaults:
autowire: true
# PSR-4 autodiscovery
Rector\:
resource: '../../src'
exclude: '../../src/{Node/Attribute.php,Rector/Contrib}'