You are viewing an older version of the documentation. For the latest, please visit master documentation.

Handler

Implements

Uses

Properties

protected

$container Container

The container implementation.

Default: null
protected

$dontReport string[]

A list of the exception types that are not reported.

Default: []
protected

$reportCallbacks Illuminate\...\ReportableHandler[]

The callbacks that should be used during reporting.

Default: []
protected

$renderCallbacks Closure[]

The callbacks that should be used during rendering.

Default: []
protected

$exceptionMap array

The registered exception mappings.

Default: []
protected

$internalDontReport string[]

A list of the internal exception types that should not be reported.

Default: array
protected

$dontFlash string[]

A list of the inputs that are never flashed for validation exceptions.

Default: array

Methods

public

__construct ( Container $container ) : void

Create a new exception handler instance.

Parameters

public

register ( ) : void

Register the exception handling callbacks for the application.

public

reportable ( callable $reportUsing ) : ReportableHandler

Register a reportable callback.

Parameters

  • $reportUsing callable
public

renderable ( callable $renderUsing ) : $this

Register a renderable callback.

Parameters

  • $renderUsing callable
public

map ( $from , $to ) : $this

Register a new exception mapping.

Parameters

protected

ignore ( string $class ) : $this

Indicate that the given exception type should not be reported.

Parameters

  • $class string
public

report ( Throwable $e ) : void

Report or log an exception.

Parameters

public

shouldReport ( Throwable $e ) : bool

Determine if the exception should be reported.

Parameters

protected

shouldntReport ( Throwable $e ) : bool

Determine if the exception is in the "do not report" list.

Parameters

protected

exceptionContext ( Throwable $e ) : array

Get the default exception context variables for logging.

Parameters

protected

context ( ) : array

Get the default context variables for logging.

public

render ( $request , Throwable $e ) : Symfony\...\Response

Render an exception into an HTTP response.

Parameters

protected

mapException ( Throwable $e ) : Throwable

Map the exception using a registered mapper if possible.

Parameters

protected

prepareException ( Throwable $e ) : Throwable

Prepare exception for rendering.

Parameters

protected

unauthenticated ( $request , AuthenticationException $exception ) : Symfony\...\Response

Convert an authentication exception into a response.

Parameters

protected

convertValidationExceptionToResponse ( ValidationException $e , $request ) : Symfony\...\Response

Create a response object from the given validation exception.

Parameters

protected

invalid ( $request , ValidationException $exception ) : Response

Convert a validation exception into a response.

Parameters

protected

invalidJson ( $request , ValidationException $exception ) : JsonResponse

Convert a validation exception into a JSON response.

Parameters

protected

shouldReturnJson ( $request , Throwable $e ) : bool

Determine if the exception handler response should be JSON.

Parameters

protected

prepareResponse ( $request , Throwable $e ) : Symfony\...\Response

Prepare a response for the given exception.

Parameters

protected

convertExceptionToResponse ( Throwable $e ) : Symfony\...\Response

Create a Symfony response for the given exception.

Parameters

protected

renderExceptionContent ( Throwable $e ) : string

Get the response content for the given exception.

Parameters

protected

renderExceptionWithWhoops ( Throwable $e ) : string

Render an exception to a string using "Whoops".

Parameters

protected

whoopsHandler ( ) : Whoops\...\Handler

Get the Whoops handler for the application.

protected

renderExceptionWithSymfony ( Throwable $e , $debug ) : string

Render an exception to a string using Symfony.

Parameters

protected

renderHttpException ( Symfony\...\HttpExceptionInterface $e ) : Symfony\...\Response

Render the given HttpException.

Parameters

  • $e Symfony\...\HttpExceptionInterface
protected

registerErrorViewPaths ( ) : void

Register the error template hint paths.

protected

getHttpExceptionView ( Symfony\...\HttpExceptionInterface $e ) : string

Get the view used to render HTTP exceptions.

Parameters

  • $e Symfony\...\HttpExceptionInterface
protected

toIlluminateResponse ( $response , Throwable $e ) : Response

Map the given exception into an Illuminate response.

Parameters

protected

prepareJsonResponse ( $request , Throwable $e ) : JsonResponse

Prepare a JSON response for the given exception.

Parameters

protected

convertExceptionToArray ( Throwable $e ) : array

Convert the given exception to an array.

Parameters

public

renderForConsole ( $output , Throwable $e ) : void

Render an exception to the console.

Parameters

  • $output Symfony\...\OutputInterface
  • $e Throwable
protected

isHttpException ( Throwable $e ) : bool

Determine if the given exception is an HTTP exception.

Parameters