Handler

class Handler implements ExceptionHandler (View source)

Properties

protected LoggerInterface $log The log implementation.
protected array $dontReport A list of the exception types that should not be reported.

Methods

void __construct(LoggerInterface $log)

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.

Response toIlluminateResponse(Response $response, Exception $e)

Map exception into an illuminate response.

void renderForConsole(OutputInterface $output, Exception $e)

Render an exception to the console.

Response renderHttpException(HttpException $e)

Render the given HttpException.

Response convertExceptionToResponse(Exception $e)

Convert the given exception into a Response instance.

bool isUnauthorizedException(Exception $e)

Determine if the given exception is an access unauthorized exception.

bool isHttpException(Exception $e)

Determine if the given exception is an HTTP exception.

Details

void __construct(LoggerInterface $log)

Create a new exception handler instance.

Parameters

LoggerInterface $log

Return Value

void

void report(Exception $e)

Report or log an exception.

Parameters

Exception $e

Return Value

void

bool shouldReport(Exception $e)

Determine if the exception should be reported.

Parameters

Exception $e

Return Value

bool

protected bool shouldntReport(Exception $e)

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

Parameters

Exception $e

Return Value

bool

Response render(Request $request, Exception $e)

Render an exception into a response.

Parameters

Request $request
Exception $e

Return Value

Response

protected Response toIlluminateResponse(Response $response, Exception $e)

Map exception into an illuminate response.

Parameters

Response $response
Exception $e

Return Value

Response

void renderForConsole(OutputInterface $output, Exception $e)

Render an exception to the console.

Parameters

OutputInterface $output
Exception $e

Return Value

void

protected Response renderHttpException(HttpException $e)

Render the given HttpException.

Parameters

HttpException $e

Return Value

Response

protected Response convertExceptionToResponse(Exception $e)

Convert the given exception into a Response instance.

Parameters

Exception $e

Return Value

Response

protected bool isUnauthorizedException(Exception $e)

Determine if the given exception is an access unauthorized exception.

Parameters

Exception $e

Return Value

bool

protected bool isHttpException(Exception $e)

Determine if the given exception is an HTTP exception.

Parameters

Exception $e

Return Value

bool

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.1/Illuminate/Foundation/Exceptions/Handler.html