src/cli/CliApplication.php
protected function doException(\Exception $e)
    {
        $command = new DefaultConsoleCommand();
        $command->data = '"Error #' . $e->getCode() . ' - ' . $e->getMessage() . '"';
        $command->execute();

        $response = (new ResponseInjector)->build();
        $response = $response->withHeader('status', (string)(int)$command->result); // TODO: hack for select cli stream

        $stream = $response->getBody();
        $stream->write($command->message);

        return $response->withBody($stream);
    }
protected function doException(\Exception $e)
    {
        $command = new DefaultConsoleCommand();
        $command->data = '"Error #' . $e->getCode() . ' - ' . $e->getMessage() . '"';
        $command->execute();

        $response = (new ResponseInjector)->build();
        $response = $response->withHeader('status', (string)(int)$command->result); // TODO: hack for select cli stream

        $stream = $response->getBody();
        $stream->write($command->message);

        return $response->withBody($stream);
    }
protected function doException ( \ Exception $ e ) { $ command = new DefaultConsoleCommand ( ) ; $ command -> data = '"Error #' . $ e -> getCode ( ) . ' - ' . $ e -> getMessage ( ) . '"' ; $ command -> execute ( ) ; $ response = ( new ResponseInjector ) -> build ( ) ; $ response = $ response -> withHeader ( 'status' , ( string ) ( int ) $ command -> result ) ; // TODO: hack for select cli stream $ stream = $ response -> getBody ( ) ; $ stream -> write ( $ command -> message ) ; return $ response -> withBody ( $ stream ) ; }
Run application with error

@param \Exception $e
@return ResponseInterface
@throws \InvalidArgumentException|\RuntimeException|Exception
Run application with error