protected function echoExceptionCli($exception)
{
$response = new CliResponse();
$exceptionMessage = $this->renderSingleExceptionCli($exception);
while (($exception = $exception->getPrevious()) !== null) {
$exceptionMessage .= PHP_EOL . '<u>Nested exception:</u>' . PHP_EOL;
$exceptionMessage .= $this->renderSingleExceptionCli($exception);
}
$response->setContent($exceptionMessage);
$response->send();
exit(1);
}