Skip to content

Commit 1d1e77c

Browse files
author
Nikita Konstantinov
committed
Define missed $command variable
1 parent 8040775 commit 1d1e77c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

components/console/events.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ Listeners receive a
106106
$dispatcher->addListener(ConsoleEvents::EXCEPTION, function (ConsoleForExceptionEvent $event) {
107107
$output = $event->getOutput();
108108

109+
$command = $event->getCommand();
110+
109111
$output->writeln(sprintf('Oops, exception thrown while running command <info>%s</info>', $command->getName()));
110112

111113
// get the current exit code (the exception code or the exit code set by a ConsoleEvents::TERMINATE event)

0 commit comments

Comments
 (0)