Exceptions
class Exceptions
Methods
Register a reportable callback.
Register a reportable callback.
Register a renderable callback.
Register a renderable callback.
Register a callback to prepare the final, rendered exception response.
Specify the callback that should be used to throttle reportable exceptions.
Set the log level for the given exception type.
Indicate that the given exception type should not be reported.
Indicate that the given exception type should stop job retries.
Register a callback to determine if an exception should not be reported.
Register a callback to determine if an exception should stop job retries.
Do not report duplicate exceptions.
Indicate that the given attributes should never be flashed to the session on validation errors.
Register the callable that determines if the exception handler response should be JSON.
Indicate that the given exception class should not be ignored.
Set the truncation length for request exception messages.
Disable truncation of request exception messages.
Details
at line 21
__construct(Handler $handler)
Create a new exception handling configuration instance.
at line 31
ReportableHandler
report(callable $using)
Register a reportable callback.
Boot-only. The callback persists on the shared handler and affects exception reporting for every subsequent request and job in the worker.
at line 42
ReportableHandler
reportable(callable $reportUsing)
Register a reportable callback.
Boot-only. The callback persists on the shared handler and affects exception reporting for every subsequent request and job in the worker.
at line 53
Exceptions
render(callable $using)
Register a renderable callback.
Boot-only. The callback persists on the shared handler and affects exception rendering for every subsequent request in the worker.
at line 66
Exceptions
renderable(callable $renderUsing)
Register a renderable callback.
Boot-only. The callback persists on the shared handler and affects exception rendering for every subsequent request in the worker.
at line 79
Exceptions
respond(callable $using)
Register a callback to prepare the final, rendered exception response.
Boot-only. The callback replaces the shared handler's response callback for every subsequent request in the worker.
at line 92
Exceptions
throttle(callable $throttleUsing)
Specify the callback that should be used to throttle reportable exceptions.
Boot-only. The callback persists on the shared handler and affects exception reporting for every subsequent request and job in the worker.
at line 107
Exceptions
map(Closure|string $from, Closure|string|null $to = null)
Register a new exception mapping.
Boot-only. The mapping persists on the shared handler and affects exception reporting and rendering for every subsequent request and job in the worker.
at line 123
Exceptions
level(string $type, string $level)
Set the log level for the given exception type.
Boot-only. The level persists on the shared handler and affects how later exceptions of that type are logged in the worker.
at line 136
Exceptions
context(Closure $contextCallback)
Register a closure that should be used to build exception context data.
Boot-only. The closure persists on the shared handler and runs for every subsequently logged exception in the worker.
at line 149
Exceptions
dontReport(array|string $class)
Indicate that the given exception type should not be reported.
Boot-only. The exception types persist on the shared handler and affect exception reporting for every subsequent request and job in the worker.
at line 164
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.
at line 181
Exceptions
dontReportWhen(Closure $dontReportWhen)
Register a callback to determine if an exception should not be reported.
Boot-only. The callback persists on the shared handler and affects exception reporting for every subsequent request and job in the worker.
at line 198
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 affects job retry decisions for every subsequent job in the worker.
at line 211
Exceptions
dontReportDuplicates()
Do not report duplicate exceptions.
Boot-only. The setting persists on the shared handler and applies to every subsequent request and job in the worker.
at line 224
Exceptions
dontFlash(array|string $attributes)
Indicate that the given attributes should never be flashed to the session on validation errors.
Boot-only. The attributes persist on the shared handler and are omitted from every subsequent validation redirect in the worker.
at line 237
Exceptions
shouldRenderJsonWhen(callable $callback)
Register the callable that determines if the exception handler response should be JSON.
Boot-only. The callable replaces the shared handler's JSON check for every subsequent request in the worker.
at line 252
Exceptions
stopIgnoring(array|string $class)
Indicate that the given exception class should not be ignored.
Boot-only. The exception lists persist on the shared handler and affect exception reporting for every subsequent request and job in the worker.
at line 265
Exceptions
truncateRequestExceptionsAt(int $length)
Set the truncation length for request exception messages.
Boot-only. The global default persists for the worker lifetime across all coroutines; per-request truncation settings take precedence.
at line 278
Exceptions
dontTruncateRequestExceptions()
Disable truncation of request exception messages.
Boot-only. The global default persists for the worker lifetime across all coroutines; per-request truncation settings take precedence.