Skip to content

Commit f6a56a0

Browse files
committed
Make the exception output visible even in quiet mode, fixes #15680
1 parent a9050a4 commit f6a56a0

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/Symfony/Component/Console/Application.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -703,10 +703,10 @@ public function renderException($e, $output)
703703
$messages[] = '';
704704
$messages[] = '';
705705

706-
$output->writeln($messages, OutputInterface::OUTPUT_RAW);
706+
$output->writeln($messages, OutputInterface::OUTPUT_RAW | OutputInterface::VERBOSITY_QUIET);
707707

708708
if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
709-
$output->writeln('<comment>Exception trace:</comment>');
709+
$output->writeln('<comment>Exception trace:</comment>', OutputInterface::VERBOSITY_QUIET);
710710

711711
// exception related properties
712712
$trace = $e->getTrace();
@@ -724,18 +724,18 @@ public function renderException($e, $output)
724724
$file = isset($trace[$i]['file']) ? $trace[$i]['file'] : 'n/a';
725725
$line = isset($trace[$i]['line']) ? $trace[$i]['line'] : 'n/a';
726726

727-
$output->writeln(sprintf(' %s%s%s() at <info>%s:%s</info>', $class, $type, $function, $file, $line));
727+
$output->writeln(sprintf(' %s%s%s() at <info>%s:%s</info>', $class, $type, $function, $file, $line), OutputInterface::VERBOSITY_QUIET);
728728
}
729729

730-
$output->writeln('');
731-
$output->writeln('');
730+
$output->writeln('', OutputInterface::VERBOSITY_QUIET);
731+
$output->writeln('', OutputInterface::VERBOSITY_QUIET);
732732
}
733733
} while ($e = $e->getPrevious());
734734

735735
if (null !== $this->runningCommand) {
736-
$output->writeln(sprintf('<info>%s</info>', sprintf($this->runningCommand->getSynopsis(), $this->getName())));
737-
$output->writeln('');
738-
$output->writeln('');
736+
$output->writeln(sprintf('<info>%s</info>', sprintf($this->runningCommand->getSynopsis(), $this->getName())), OutputInterface::VERBOSITY_QUIET);
737+
$output->writeln('', OutputInterface::VERBOSITY_QUIET);
738+
$output->writeln('', OutputInterface::VERBOSITY_QUIET);
739739
}
740740
}
741741

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy