Do not display short exception trace for built-in console exceptions

This commit is contained in:
Yonel Ceruto 2017-09-07 11:35:49 -04:00
parent c97c6d48b3
commit 47b1106868
4 changed files with 3 additions and 4 deletions

View File

@ -761,7 +761,9 @@ class Application
}
$messages = array();
$messages[] = sprintf('<comment>%s</comment>', OutputFormatter::escape(sprintf('In %s line %s:', basename($e->getFile()) ?: 'n/a', $e->getLine() ?: 'n/a')));
if (!$e instanceof ExceptionInterface || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
$messages[] = sprintf('<comment>%s</comment>', OutputFormatter::escape(sprintf('In %s line %s:', basename($e->getFile()) ?: 'n/a', $e->getLine() ?: 'n/a')));
}
$messages[] = $emptyLine = sprintf('<error>%s</error>', str_repeat(' ', $len));
if ('' === $message || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
$messages[] = sprintf('<error>%s%s</error>', $title, str_repeat(' ', max(0, $len - Helper::strlen($title))));

View File

@ -1,5 +1,4 @@
In Application.php line 615:
Command "foo" is not defined.

View File

@ -1,5 +1,4 @@
In ArrayInput.php line 178:
The "--foo" option does not exist.

View File

@ -1,5 +1,4 @@
In Application.php line 615:
Command "foo" is not define
d.