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.
Register a callback before final exception response customization.
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 24
__construct(Handler $handler)
Create a new exception handling configuration instance.
at line 34
ReportableHandler
report(callable $using)
Register a reportable callback.
On the application's worker-shared handler, the callback affects exception reporting for every subsequent request and job in the worker.
at line 45
ReportableHandler
reportable(callable $reportUsing)
Register a reportable callback.
On the application's worker-shared handler, the callback affects exception reporting for every subsequent request and job in the worker.
at line 58
Exceptions
render(callable $using)
Register a renderable callback.
On the application's worker-shared handler, the callback affects exception rendering for every subsequent request in the worker.
at line 73
Exceptions
renderable(callable $renderUsing)
Register a renderable callback.
On the application's worker-shared handler, the callback affects exception rendering for every subsequent request in the worker.
at line 88
Exceptions
respond(callable $using)
Register a callback to prepare the final, rendered exception response.
On the application's worker-shared handler, the callback replaces the response callback for every subsequent request in the worker.
at line 104
Exceptions
beforeResponding(callable $callback)
Register a callback before final exception response customization.
On the application's worker-shared handler, the callback runs for every subsequent exception response in the worker. Callback return values are ignored.
at line 119
Exceptions
throttle(callable $throttleUsing)
Specify the callback that should be used to throttle reportable exceptions.
On the application's worker-shared handler, the callback affects exception reporting for every subsequent request and job in the worker.
at line 136
Exceptions
map(Closure|string $from, Closure|string|null $to = null)
Register a new exception mapping.
On the application's worker-shared handler, the mapping affects exception reporting and rendering for every subsequent request and job in the worker.
at line 153
Exceptions
level(string $type, string $level)
Set the log level for the given exception type.
On the application's worker-shared handler, the level affects how later exceptions of that type are logged in the worker.
at line 168
Exceptions
context(Closure $contextCallback)
Register a closure that should be used to build exception context data.
On the application's worker-shared handler, the closure runs for every subsequently logged exception in the worker.
at line 183
Exceptions
dontReport(array|string $class)
Indicate that the given exception type should not be reported.
On the application's worker-shared handler, the exception types affect exception reporting for every subsequent request and job in the worker.
at line 200
Exceptions
dontRetry(array|string $class)
Indicate that the given exception type should stop job retries.
On the application's worker-shared handler, the exception types affect every subsequently failed job in the worker.
at line 218
Exceptions
dontReportWhen(Closure $dontReportWhen)
Register a callback to determine if an exception should not be reported.
On the application's worker-shared handler, the callback affects exception reporting for every subsequent request and job in the worker.
at line 236
Exceptions
dontRetryWhen(Closure $dontRetryWhen)
Register a callback to determine if an exception should stop job retries.
On the application's worker-shared handler, the callback affects job retry decisions for every subsequent job in the worker.
at line 251
Exceptions
dontReportDuplicates()
Do not report duplicate exceptions.
On the application's worker-shared handler, the setting applies to every subsequent request and job in the worker.
at line 266
Exceptions
dontFlash(array|string $attributes)
Indicate that the given attributes should never be flashed to the session on validation errors.
On the application's worker-shared handler, the attributes are omitted from every subsequent validation redirect in the worker.
at line 281
Exceptions
shouldRenderJsonWhen(callable $callback)
Register the callable that determines if the exception handler response should be JSON.
On the application's worker-shared handler, the callable replaces the JSON check for every subsequent request in the worker.
at line 297
Exceptions
stopIgnoring(array|string $class)
Indicate that the given exception class should not be ignored.
On the application's worker-shared handler, the exception lists affect exception reporting for every subsequent request and job in the worker.
at line 312
Exceptions
truncateRequestExceptionsAt(int $length)
Set the truncation length for request exception messages.
The global default persists for the worker lifetime across all coroutines; per-request truncation settings take precedence.
at line 328
Exceptions
dontTruncateRequestExceptions()
Disable truncation of request exception messages.
The global default persists for the worker lifetime across all coroutines; per-request truncation settings take precedence.