original_string: private function handleException(\Throwable $t, Request $request)
      {
          if ($this->log !== null) {
              $this->log->error('Exception thrown inside a controller.', array(
                      'exception' => $t,
              ));
          } else {
              // If no logger is set, let's log in PHP error_log
              error_log($t->getMessage().' - '.$t->getTraceAsString());
          }
  
          $response = SplashUtils::buildControllerResponse(
              function () use ($t, $request) {
                  return $this->errorController->serverError($t, $request);
              }
          );
  
          return $response;
      }
code: private function handleException(\Throwable $t, Request $request)
      {
          if ($this->log !== null) {
              $this->log->error('Exception thrown inside a controller.', array(
                      'exception' => $t,
              ));
          } else {
              // If no logger is set, let's log in PHP error_log
              error_log($t->getMessage().' - '.$t->getTraceAsString());
          }
  
          $response = SplashUtils::buildControllerResponse(
              function () use ($t, $request) {
                  return $this->errorController->serverError($t, $request);
              }
          );
  
          return $response;
      }
code_tokens: private function handleException ( \ Throwable $ t , Request $ request ) { if ( $ this -> log !== null ) { $ this -> log -> error ( 'Exception thrown inside a controller.' , array ( 'exception' => $ t , ) ) ; } else { // If no logger is set, let's log in PHP error_log error_log ( $ t -> getMessage ( ) . ' - ' . $ t -> getTraceAsString ( ) ) ; } $ response = SplashUtils :: buildControllerResponse ( function ( ) use ( $ t , $ request ) { return $ this -> errorController -> serverError ( $ t , $ request ) ; } ) ; return $ response ; }
docstring: Actually handle the exception.
  
  @param \Throwable $t
  @param Request $request
  @return ResponseInterface
docstring_tokens: Actually handle the exception .