class Exceptions

Methods

__construct(Handler $handler)

Create a new exception handling configuration instance.

report(callable $using)

Register a reportable callback.

reportable(callable $reportUsing)

Register a reportable callback.

render(callable $using)

Register a renderable callback.

renderable(callable $renderUsing)

Register a renderable callback.

respond(callable $using)

Register a callback to prepare the final, rendered exception response.

throttle(callable $throttleUsing)

Specify the callback that should be used to throttle reportable exceptions.

map(Closure|string $from, Closure|string|null $to = null)

Register a new exception mapping.

level(string $type, string $level)

Set the log level for the given exception type.

context(Closure $contextCallback)

Register a closure that should be used to build exception context data.

dontReport(array|string $class)

Indicate that the given exception type should not be reported.

dontRetry(array|string $class)

Indicate that the given exception type should stop job retries.

dontReportWhen(Closure $dontReportWhen)

Register a callback to determine if an exception should not be reported.

dontRetryWhen(Closure $dontRetryWhen)

Register a callback to determine if an exception should stop job retries.

dontReportDuplicates()

Do not report duplicate exceptions.

dontFlash(array|string $attributes)

Indicate that the given attributes should never be flashed to the session on validation errors.

shouldRenderJsonWhen(callable $callback)

Register the callable that determines if the exception handler response should be JSON.

stopIgnoring(array|string $class)

Indicate that the given exception class should not be ignored.

truncateRequestExceptionsAt(int $length)

Set the truncation length for request exception messages.

dontTruncateRequestExceptions()

Disable truncation of request exception messages.

Details

at line 20
__construct(Handler $handler)

Create a new exception handling configuration instance.

Parameters

Handler $handler

at line 27
ReportableHandler report(callable $using)

Register a reportable callback.

Parameters

callable $using

Return Value

ReportableHandler

at line 35
ReportableHandler reportable(callable $reportUsing)

Register a reportable callback.

Parameters

callable $reportUsing

Return Value

ReportableHandler

at line 43
Exceptions render(callable $using)

Register a renderable callback.

Parameters

callable $using

Return Value

Exceptions

at line 53
Exceptions renderable(callable $renderUsing)

Register a renderable callback.

Parameters

callable $renderUsing

Return Value

Exceptions

at line 63
Exceptions respond(callable $using)

Register a callback to prepare the final, rendered exception response.

Parameters

callable $using

Return Value

Exceptions

at line 73
Exceptions throttle(callable $throttleUsing)

Specify the callback that should be used to throttle reportable exceptions.

Parameters

callable $throttleUsing

Return Value

Exceptions

at line 85
Exceptions map(Closure|string $from, Closure|string|null $to = null)

Register a new exception mapping.

Parameters

Closure|string $from
Closure|string|null $to

Return Value

Exceptions

Exceptions

InvalidArgumentException

at line 98
Exceptions level(string $type, string $level)

Set the log level for the given exception type.

Parameters

string $type
string $level

Return Value

Exceptions

at line 108
Exceptions context(Closure $contextCallback)

Register a closure that should be used to build exception context data.

Parameters

Closure $contextCallback

Return Value

Exceptions

at line 118
Exceptions dontReport(array|string $class)

Indicate that the given exception type should not be reported.

Parameters

array|string $class

Return Value

Exceptions

at line 133
Exceptions dontRetry(array|string $class)

Indicate that the given exception type should stop job retries.

Boot-only. The exception types persist on the shared handler and affect every subsequently failed job in the worker.

Parameters

array|string $class

Return Value

Exceptions

at line 147
Exceptions dontReportWhen(Closure $dontReportWhen)

Register a callback to determine if an exception should not be reported.

Parameters

Closure $dontReportWhen

Return Value

Exceptions

at line 164
Exceptions dontRetryWhen(Closure $dontRetryWhen)

Register a callback to determine if an exception should stop job retries.

Boot-only. The callback persists on the shared handler and is considered for every subsequently failed job in the worker.

Parameters

Closure $dontRetryWhen

Return Value

Exceptions

at line 174
Exceptions dontReportDuplicates()

Do not report duplicate exceptions.

Return Value

Exceptions

at line 184
Exceptions dontFlash(array|string $attributes)

Indicate that the given attributes should never be flashed to the session on validation errors.

Parameters

array|string $attributes

Return Value

Exceptions

at line 194
Exceptions shouldRenderJsonWhen(callable $callback)

Register the callable that determines if the exception handler response should be JSON.

Parameters

callable $callback

Return Value

Exceptions

at line 206
Exceptions stopIgnoring(array|string $class)

Indicate that the given exception class should not be ignored.

Parameters

array|string $class

Return Value

Exceptions

at line 216
Exceptions truncateRequestExceptionsAt(int $length)

Set the truncation length for request exception messages.

Parameters

int $length

Return Value

Exceptions

at line 226
Exceptions dontTruncateRequestExceptions()

Disable truncation of request exception messages.

Return Value

Exceptions