original_string: protected function toIlluminateResponse($response, Exception $e)
      {
          if ($response instanceof SymfonyRedirectResponse) {
              $response = new RedirectResponse(
                  $response->getTargetUrl(), $response->getStatusCode(), $response->headers->all()
              );
          } else {
              $response = new Response(
                  $response->getContent(), $response->getStatusCode(), $response->headers->all()
              );
          }
  
          return $response->withException($e);
      }
code: protected function toIlluminateResponse($response, Exception $e)
      {
          if ($response instanceof SymfonyRedirectResponse) {
              $response = new RedirectResponse(
                  $response->getTargetUrl(), $response->getStatusCode(), $response->headers->all()
              );
          } else {
              $response = new Response(
                  $response->getContent(), $response->getStatusCode(), $response->headers->all()
              );
          }
  
          return $response->withException($e);
      }
code_tokens: protected function toIlluminateResponse ( $ response , Exception $ e ) { if ( $ response instanceof SymfonyRedirectResponse ) { $ response = new RedirectResponse ( $ response -> getTargetUrl ( ) , $ response -> getStatusCode ( ) , $ response -> headers -> all ( ) ) ; } else { $ response = new Response ( $ response -> getContent ( ) , $ response -> getStatusCode ( ) , $ response -> headers -> all ( ) ) ; } return $ response -> withException ( $ e ) ; }
docstring: Map the given exception into an Illuminate response.
  
  @param  \Symfony\Component\HttpFoundation\Response  $response
  @param  \Exception  $e
  @return \Illuminate\Http\Response
docstring_tokens: Map the given exception into an Illuminate response .