class Exceptions (View source)

Methods

void
__construct(Handler $handler)

Create a new exception handling configuration instance.

report(callable $using)

Register a reportable callback.

reportable(callable $reportUsing)

Register a reportable callback.

$this
render(callable $using)

Register a renderable callback.

$this
renderable(callable $renderUsing)

Register a renderable callback.

$this
respond(callable $using)

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

$this
throttle(callable $throttleUsing)

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

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

Register a new exception mapping.

$this
level(string $type, string $level)

Set the log level for the given exception type.

$this
context(Closure $contextCallback)

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

$this
dontReport(array|string $class)

Indicate that the given exception type should not be reported.

$this
dontReportDuplicates()

Do not report duplicate exceptions.

$this
dontFlash(array|string $attributes)

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

$this
shouldRenderJsonWhen(callable $callback)

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

$this
stopIgnoring(array|string $class)

Indicate that the given exception class should not be ignored.

$this
truncateRequestExceptionsAt(int $length)

Set the truncation length for request exception messages.

$this
dontTruncateRequestExceptions()

Disable truncation of request exception messages.

Details

void __construct(Handler $handler)

Create a new exception handling configuration instance.

Parameters

Handler $handler

Return Value

void

ReportableHandler report(callable $using)

Register a reportable callback.

Parameters

callable $using

Return Value

ReportableHandler

ReportableHandler reportable(callable $reportUsing)

Register a reportable callback.

Parameters

callable $reportUsing

Return Value

ReportableHandler

$this render(callable $using)

Register a renderable callback.

Parameters

callable $using

Return Value

$this

$this renderable(callable $renderUsing)

Register a renderable callback.

Parameters

callable $renderUsing

Return Value

$this

$this respond(callable $using)

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

Parameters

callable $using

Return Value

$this

$this throttle(callable $throttleUsing)

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

Parameters

callable $throttleUsing

Return Value

$this

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

Register a new exception mapping.

Parameters

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

Return Value

$this

Exceptions

InvalidArgumentException

$this level(string $type, string $level)

Set the log level for the given exception type.

Parameters

string $type
string $level

Return Value

$this

$this context(Closure $contextCallback)

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

Parameters

Closure $contextCallback

Return Value

$this

$this dontReport(array|string $class)

Indicate that the given exception type should not be reported.

Parameters

array|string $class

Return Value

$this

$this dontReportDuplicates()

Do not report duplicate exceptions.

Return Value

$this

$this 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

$this

$this shouldRenderJsonWhen(callable $callback)

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

Parameters

callable $callback

Return Value

$this

$this stopIgnoring(array|string $class)

Indicate that the given exception class should not be ignored.

Parameters

array|string $class

Return Value

$this

$this truncateRequestExceptionsAt(int $length)

Set the truncation length for request exception messages.

Parameters

int $length

Return Value

$this

$this dontTruncateRequestExceptions()

Disable truncation of request exception messages.

Return Value

$this