protected function printFormatterException(OutputInterface $output, $formatterName, \Exception $exception) { $output->writeln(''); $errorMessages = ['', sprintf('Output formatter %s threw an Exception:', $formatterName), sprintf('Message: %s', $exception->getMessage()), '']; $output->writeln($this->getHelper('formatter')->formatBlock($errorMessages, 'error')); $output->writeln(''); }