Neos\Flow\Error\AbstractExceptionHandler::echoExceptionCli PHP Method

echoExceptionCli() protected method

Formats and echoes the exception and its previous exceptions (if any) for the command line
protected echoExceptionCli ( object $exception ) : void
$exception object \Exception or \Throwable
return void
    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);
    }