original_string: protected function _displayException($exception)
      {
          $rendererClassName = App::className($this->_options['exceptionRenderer'], 'Error');
          try {
              if (!$rendererClassName) {
                  throw new Exception("$rendererClassName is an invalid class.");
              }
              /** @var \Cake\Error\ExceptionRendererInterface $renderer */
              $renderer = new $rendererClassName($exception);
              $response = $renderer->render();
              $this->_clearOutput();
              $this->_sendResponse($response);
          } catch (Throwable $exception) {
              $this->_logInternalError($exception);
          } catch (Exception $exception) {
              $this->_logInternalError($exception);
          }
      }
code: protected function _displayException($exception)
      {
          $rendererClassName = App::className($this->_options['exceptionRenderer'], 'Error');
          try {
              if (!$rendererClassName) {
                  throw new Exception("$rendererClassName is an invalid class.");
              }
              /** @var \Cake\Error\ExceptionRendererInterface $renderer */
              $renderer = new $rendererClassName($exception);
              $response = $renderer->render();
              $this->_clearOutput();
              $this->_sendResponse($response);
          } catch (Throwable $exception) {
              $this->_logInternalError($exception);
          } catch (Exception $exception) {
              $this->_logInternalError($exception);
          }
      }
code_tokens: protected function _displayException ( $ exception ) { $ rendererClassName = App :: className ( $ this -> _options [ 'exceptionRenderer' ] , 'Error' ) ; try { if ( ! $ rendererClassName ) { throw new Exception ( "$rendererClassName is an invalid class." ) ; } /** @var \Cake\Error\ExceptionRendererInterface $renderer */ $ renderer = new $ rendererClassName ( $ exception ) ; $ response = $ renderer -> render ( ) ; $ this -> _clearOutput ( ) ; $ this -> _sendResponse ( $ response ) ; } catch ( Throwable $ exception ) { $ this -> _logInternalError ( $ exception ) ; } catch ( Exception $ exception ) { $ this -> _logInternalError ( $ exception ) ; } }
docstring: Displays an exception response body.
  
  @param \Exception $exception The exception to display.
  @return void
  @throws \Exception When the chosen exception renderer is invalid.
docstring_tokens: Displays an exception response body .