original_string: public function getErrorMessage($exception)
      {
          $application = $this->application;
          $errorHandler = $this->runner;
  
          // quit if error occured
          $shouldQuit = $application->isError();
  
          //
          if($application instanceof Application){
              // if request type ist not strict e.g. xml or json consider error config
              if (!$application->isXmlRequest() && !$application->isJsonRequest()) {
                  $shouldQuit = $shouldQuit && $application->getConfig(ApplicationInterface::KEY_ERROR, ApplicationInterface::DEFAULT_ERROR);
              }
          }
  
          $errorHandler->allowQuit($shouldQuit);
  
          $method = $errorHandler::EXCEPTION_HANDLER;
          ob_start();
          $errorHandler->$method($exception);
          $message = ob_get_clean();
  
          return $message;
      }
code: public function getErrorMessage($exception)
      {
          $application = $this->application;
          $errorHandler = $this->runner;
  
          // quit if error occured
          $shouldQuit = $application->isError();
  
          //
          if($application instanceof Application){
              // if request type ist not strict e.g. xml or json consider error config
              if (!$application->isXmlRequest() && !$application->isJsonRequest()) {
                  $shouldQuit = $shouldQuit && $application->getConfig(ApplicationInterface::KEY_ERROR, ApplicationInterface::DEFAULT_ERROR);
              }
          }
  
          $errorHandler->allowQuit($shouldQuit);
  
          $method = $errorHandler::EXCEPTION_HANDLER;
          ob_start();
          $errorHandler->$method($exception);
          $message = ob_get_clean();
  
          return $message;
      }
code_tokens: public function getErrorMessage ( $ exception ) { $ application = $ this -> application ; $ errorHandler = $ this -> runner ; // quit if error occured $ shouldQuit = $ application -> isError ( ) ; // if ( $ application instanceof Application ) { // if request type ist not strict e.g. xml or json consider error config if ( ! $ application -> isXmlRequest ( ) && ! $ application -> isJsonRequest ( ) ) { $ shouldQuit = $ shouldQuit && $ application -> getConfig ( ApplicationInterface :: KEY_ERROR , ApplicationInterface :: DEFAULT_ERROR ) ; } } $ errorHandler -> allowQuit ( $ shouldQuit ) ; $ method = $ errorHandler :: EXCEPTION_HANDLER ; ob_start ( ) ; $ errorHandler -> $ method ( $ exception ) ; $ message = ob_get_clean ( ) ; return $ message ; }
docstring: Determine error message by error configuration
  
  @param \Throwable|\Exception $exception
  
  @return string
docstring_tokens: Determine error message by error configuration