Skip to content

Commit 860f814

Browse files
committed
Merge pull request #2540 from unkind/master
Define missed variable
2 parents 4ec619a + 1d1e77c commit 860f814

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)