class Exceptions (View source)

Methods

void
__construct(Handler $handler)

Create a new exception handling configuration instance.

reportable(callable $reportUsing)

Register a reportable callback.

$this
renderable(callable $renderUsing)

Register a renderable callback.

$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(Throwable> $type, $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(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.

Details

void __construct(Handler $handler)

Create a new exception handling configuration instance.

Parameters

Handler $handler

Return Value

void

ReportableHandler reportable(callable $reportUsing)

Register a reportable callback.

Parameters

callable $reportUsing

Return Value

ReportableHandler

$this renderable(callable $renderUsing)

Register a renderable callback.

Parameters

callable $renderUsing

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(Throwable> $type, $level)

Set the log level for the given exception type.

Parameters

Throwable> $type
$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(string $class)

Indicate that the given exception type should not be reported.

Parameters

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