Handler
class Winter\Storm\Foundation\Exception\Handler
extends Illuminate\Foundation\Exceptions\Handler
Extends
Class | Description |
---|---|
Illuminate\Foundation\Exceptions\Handler
|
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 | Type | Description |
---|---|---|
$callback | Closure |
Closure
|
Returns
void
public render (Illuminate\Http\Request $request, Throwable $throwable) : Symfony\Component\HttpFoundation\Response
Render an exception into an HTTP response.
Parameters
Property | Type | Description |
---|---|---|
$request | Illuminate\Http\Request |
Illuminate\Http\Request
|
$throwable | 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 | Type | Description |
---|---|---|
$throwable | Throwable |
Throwable
|
Returns
void
protected
callCustomHandlers (Throwable $throwable, boolean $fromConsole = false
)
: mixed | null
Handle the given throwable.
Parameters
Property | Type | Description |
---|---|---|
$throwable | Throwable |
Throwable
|
$fromConsole | boolean |
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 | Type | Description |
---|---|---|
$throwable | Throwable |
Throwable
|
Returns
int
protected handlesThrowable (Closure $handler, Throwable $throwable) : bool
Determine if the given handler handles this throwable.
Parameters
Property | Type | Description |
---|---|---|
$handler | Closure |
Closure
|
$throwable | Throwable |
Throwable
|
Returns
bool
protected hints (ReflectionFunction $reflection, Throwable $throwable) : bool
Determine if the given handler type hints the throwable.
Parameters
Property | Type | Description |
---|---|---|
$reflection | ReflectionFunction |
ReflectionFunction
|
$throwable | Throwable |
Throwable
|
Returns
bool
← Previous page
Winter\Storm\Foundation\Console\KeyGenerateCommand
Next page →
Winter\Storm\Foundation\Http\Kernel
Copyright © 2024 Winter CMS