class Handler implements ExceptionHandler

Properties

protected Container $container

The container implementation.

protected array $dontReport

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

Methods

void
__construct(Container $container)

Create a new exception handler instance.

void
report(Exception $e)

Report or log an exception.

bool
shouldReport(Exception $e)

Determine if the exception should be reported.

bool
shouldntReport(Exception $e)

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

Response
render(Request $request, Exception $e)

Render an exception into a response.

prepareException(Exception $e)

Prepare exception for rendering.

Response
convertValidationExceptionToResponse(ValidationException $e, Request $request)

Create a response object from the given validation exception.

Response
prepareResponse(Request $request, Exception $e)

Prepare response containing exception render.

Response
renderHttpException(HttpException $e)

Render the given HttpException.

Response
convertExceptionToResponse(Exception $e)

Create a Symfony response for the given exception.

toIlluminateResponse(Response $response, Exception $e)

Map the given exception into an Illuminate response.

void
renderForConsole(OutputInterface $output, Exception $e)

Render an exception to the console.

bool
isHttpException(Exception $e)

Determine if the given exception is an HTTP exception.

Details

at line 46
void __construct(Container $container)

Create a new exception handler instance.

Parameters

Container $container

Return Value

void

at line 59
void report(Exception $e)

Report or log an exception.

Parameters

Exception $e

Return Value

void

Exceptions

Exception

at line 80
bool shouldReport(Exception $e)

Determine if the exception should be reported.

Parameters

Exception $e

Return Value

bool

at line 91
protected bool shouldntReport(Exception $e)

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

Parameters

Exception $e

Return Value

bool

at line 107
Response render(Request $request, Exception $e)

Render an exception into a response.

Parameters

Request $request
Exception $e

Return Value

Response

at line 128
protected Exception prepareException(Exception $e)

Prepare exception for rendering.

Parameters

Exception $e

Return Value

Exception

at line 146
protected Response convertValidationExceptionToResponse(ValidationException $e, Request $request)

Create a response object from the given validation exception.

Parameters

ValidationException $e
Request $request

Return Value

Response

at line 170
protected Response prepareResponse(Request $request, Exception $e)

Prepare response containing exception render.

Parameters

Request $request
Exception $e

Return Value

Response

at line 185
protected Response renderHttpException(HttpException $e)

Render the given HttpException.

Parameters

HttpException $e

Return Value

Response

at line 207
protected Response convertExceptionToResponse(Exception $e)

Create a Symfony response for the given exception.

Parameters

Exception $e

Return Value

Response

at line 223
protected Response toIlluminateResponse(Response $response, Exception $e)

Map the given exception into an Illuminate response.

Parameters

Response $response
Exception $e

Return Value

Response

at line 241
void renderForConsole(OutputInterface $output, Exception $e)

Render an exception to the console.

Parameters

OutputInterface $output
Exception $e

Return Value

void

at line 252
protected bool isHttpException(Exception $e)

Determine if the given exception is an HTTP exception.

Parameters

Exception $e

Return Value

bool