From 1d1e77ca69c209d41d75a28c53b50ec125f1c748 Mon Sep 17 00:00:00 2001 From: Nikita Konstantinov Date: Mon, 22 Apr 2013 23:47:52 +0400 Subject: [PATCH] Define missed $command variable --- components/console/events.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/console/events.rst b/components/console/events.rst index 7306aa50d06..661e2586038 100644 --- a/components/console/events.rst +++ b/components/console/events.rst @@ -106,6 +106,8 @@ Listeners receive a $dispatcher->addListener(ConsoleEvents::EXCEPTION, function (ConsoleForExceptionEvent $event) { $output = $event->getOutput(); + $command = $event->getCommand(); + $output->writeln(sprintf('Oops, exception thrown while running command %s', $command->getName())); // get the current exit code (the exception code or the exit code set by a ConsoleEvents::TERMINATE event)