ExceptionHandler
- Full name:
\Codefy\Framework\Http\Middleware\Exception\ExceptionHandler
Properties
strategies
app
Methods
__construct
public __construct(class-string<\Codefy\Framework\Http\Middleware\Exception\Strategy\HttpResponseStrategy>[]|\Codefy\Framework\Http\Middleware\Exception\Strategy\HttpResponseStrategy[] $strategies, \Codefy\Framework\Application $app): mixed
Parameters:
| Parameter | Type | Description |
|---|---|---|
$strategies | class-string<\Codefy\Framework\Http\Middleware\Exception\Strategy\HttpResponseStrategy>[]|\Codefy\Framework\Http\Middleware\Exception\Strategy\HttpResponseStrategy[] | |
$app | \Codefy\Framework\Application |
handle
public handle(\Throwable $e, \Psr\Http\Message\ServerRequestInterface $request): \Psr\Http\Message\ResponseInterface
Parameters:
| Parameter | Type | Description |
|---|---|---|
$e | \Throwable | |
$request | \Psr\Http\Message\ServerRequestInterface |
Throws:
Inherited methods
normalizeStatusCode
Parameters:
| Parameter | Type | Description |
|---|---|---|
$code | int |
isJson
Parameters:
| Parameter | Type | Description |
|---|---|---|
$request | \Psr\Http\Message\ServerRequestInterface |
getSafeReferrer
Parameters:
| Parameter | Type | Description |
|---|---|---|
$request | \Psr\Http\Message\ServerRequestInterface |
shouldRenderView
Throws:
logException
Parameters:
| Parameter | Type | Description |
|---|---|---|
$t | \Throwable |
Throws: