original_string: private function createInternalServerError(\Exception $exception)
      {
          $message = sprintf(
              '%s: %s (uncaught exception) at %s line %s',
              get_class($exception),
              $exception->getMessage(),
              $exception->getFile(),
              $exception->getLine()
          );
  
          $this->logger->error($message, array('exception' => $exception));
  
          $response = [
              'status'  => 'ERROR',
              'message' => JsonResponse::$statusTexts[JsonResponse::HTTP_INTERNAL_SERVER_ERROR]
          ];
  
          if ($this->debug) {
              $response['exception'] = $this->formatException($exception);
          }
  
          return new JsonResponse($response, JsonResponse::HTTP_INTERNAL_SERVER_ERROR);
      }
code: private function createInternalServerError(\Exception $exception)
      {
          $message = sprintf(
              '%s: %s (uncaught exception) at %s line %s',
              get_class($exception),
              $exception->getMessage(),
              $exception->getFile(),
              $exception->getLine()
          );
  
          $this->logger->error($message, array('exception' => $exception));
  
          $response = [
              'status'  => 'ERROR',
              'message' => JsonResponse::$statusTexts[JsonResponse::HTTP_INTERNAL_SERVER_ERROR]
          ];
  
          if ($this->debug) {
              $response['exception'] = $this->formatException($exception);
          }
  
          return new JsonResponse($response, JsonResponse::HTTP_INTERNAL_SERVER_ERROR);
      }
code_tokens: private function createInternalServerError ( \ Exception $ exception ) { $ message = sprintf ( '%s: %s (uncaught exception) at %s line %s' , get_class ( $ exception ) , $ exception -> getMessage ( ) , $ exception -> getFile ( ) , $ exception -> getLine ( ) ) ; $ this -> logger -> error ( $ message , array ( 'exception' => $ exception ) ) ; $ response = [ 'status' => 'ERROR' , 'message' => JsonResponse :: $ statusTexts [ JsonResponse :: HTTP_INTERNAL_SERVER_ERROR ] ] ; if ( $ this -> debug ) { $ response [ 'exception' ] = $ this -> formatException ( $ exception ) ; } return new JsonResponse ( $ response , JsonResponse :: HTTP_INTERNAL_SERVER_ERROR ) ; }
docstring: Create a 500 response.
  
  @param \Exception $exception The exception to log.
  
  @return JsonResponse
docstring_tokens: Create a 500 response .