interface ExceptionHandler

Methods

void
report(Throwable $e, array $context = [], string|null $level = null)

Report or log an exception.

bool
shouldReport(Throwable $e)

Determine if the exception should be reported.

Response
render(Request $request, Throwable $e)

Render an exception into an HTTP response.

void
renderForConsole(OutputInterface $output, Throwable $e)

Render an exception to the console.

bool
isReporting(Throwable $e)

Determine if a given exception is being reported.

array
buildContextForException(Throwable $e)

Create the context for an exception.

void
afterResponse(callable $callback)

Register a callback to be called after an HTTP error response is rendered.

bool
shouldStopRetries(Throwable $e)

No description

Details

at line 26
void report(Throwable $e, array $context = [], string|null $level = null)

Report or log an exception.

Parameters

Throwable $e
array $context
string|null $level

Return Value

void

Exceptions

Throwable

at line 31
bool shouldReport(Throwable $e)

Determine if the exception should be reported.

Parameters

Throwable $e

Return Value

bool

at line 38
Response render(Request $request, Throwable $e)

Render an exception into an HTTP response.

Parameters

Request $request
Throwable $e

Return Value

Response

Exceptions

Throwable

at line 43
void renderForConsole(OutputInterface $output, Throwable $e)

Render an exception to the console.

Parameters

OutputInterface $output
Throwable $e

Return Value

void

at line 48
bool isReporting(Throwable $e)

Determine if a given exception is being reported.

Parameters

Throwable $e

Return Value

bool

at line 55
array buildContextForException(Throwable $e)

Create the context for an exception.

Parameters

Throwable $e

Return Value

array

at line 60
void afterResponse(callable $callback)

Register a callback to be called after an HTTP error response is rendered.

Parameters

callable $callback

Return Value

void

at line 16
bool shouldStopRetries(Throwable $e)

No description

Parameters

Throwable $e

Return Value

bool