Handler

 class Winter\Storm\Foundation\Exception\Handler
extends Illuminate\Foundation\Exceptions\Handler

Extends

Properties

protected $dontReport : array<int,class-string<\Throwable>>

A list of the exception types that should not be reported.

protected $handlers : array

All of the register exception handlers.

Methods

public error (Closure $callback) : void

Register an application error handler.

Parameters
Property Description
$callback
Closure
Returns
void

public render (Illuminate\Http\Request $request, Throwable $throwable) : Symfony\Component\HttpFoundation\Response

Render an exception into an HTTP response.

Parameters
Property Description
$request
Illuminate\Http\Request
$throwable
Throwable
Returns
Symfony\Component\HttpFoundation\Response

public report (Throwable $throwable) : void

Report or log an throwable.

This is a great spot to send exceptions to Sentry, Bugsnag, etc.

Parameters
Property Description
$throwable
Throwable
Returns
void

protected callCustomHandlers (Throwable $throwable, boolean $fromConsole = false) : mixed | null

Handle the given throwable.

Parameters
Property Description
$throwable
Throwable
$fromConsole
boolean
Returns
mixed | null

protected context () : array

Get the default context variables for logging.

Returns
array

protected getStatusCode (Throwable $throwable) : int

Checks if the exception implements the HttpExceptionInterface, or returns as generic 500 error code for a server side error.

Parameters
Property Description
$throwable
Throwable
Returns
int

protected handlesThrowable (Closure $handler, Throwable $throwable) : bool

Determine if the given handler handles this throwable.

Parameters
Property Description
$handler
Closure
$throwable
Throwable
Returns
bool

protected hints (ReflectionFunction $reflection, Throwable $throwable) : bool

Determine if the given handler type hints the throwable.

Parameters
Property Description
$reflection
ReflectionFunction
$throwable
Throwable
Returns
bool
Copyright © 2024 Winter CMS