original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: Run application with error
  
  @param \Exception $e
  @return ResponseInterface
  @throws \InvalidArgumentException|\RuntimeException|Exception
docstring_tokens: Run application with error