Property | Type | Description | |
---|---|---|---|
$defaultHandler | Autarky\Errors\ErrorHandlerInterface | null | ||
$handlers | SplDoublyLinkedList | ||
$resolver | |||
$rethrow | boolean | Re-throw exceptions rather than handling them. |
Method | Description | |
---|---|---|
__construct ( |
||
appendHandler ( $handler ) | ||
handle ( Exception $exception ) | ||
handleError ( integer $level, string $message, string $file = '', integer $line, array $context = [] ) | Handle a PHP error. | |
handleShutdown ( ) : void | Handle a PHP fatal error. | |
handleUncaught ( Exception $exception ) : |
Handle an uncaught exception. Does the same as handle(), but also sends the response, as we can assume that the exception happened outside of HttpKernelInterface::handle. | |
prependHandler ( $handler ) | ||
register ( ) | ||
setDefaultHandler ( Autarky\Errors\ErrorHandlerInterface $handler ) | ||
setRethrow ( $rethrow ) | ||
throwFatalErrorException ( ) : void | Throw a FatalErrorException if an error has occured. |
Method | Description | |
---|---|---|
callHandler ( mixed $handler, Exception $exception ) : mixed | Call an exception handler. | |
checkHandler ( $handler ) | ||
makeFatalErrorException ( ) : Symfony\Component\Debug\Exception\FatalErrorException | null | Create a FatalErrorException out of the information stored on the last PHP error. | |
makeResponse ( mixed $response, Exception $exception ) : |
Transform an exception handler's response into a Response object. | |
matchesTypehint ( callable | Autarky\Errors\ErrorHandlerInterface $handler, Exception $exception ) : boolean | Check if a handler's argument typehint matches an exception. |
public __construct ( |
||
$resolver |
protected callHandler ( mixed $handler, Exception $exception ) : mixed | ||
$handler | mixed | |
$exception | Exception | |
return | mixed |
public handleShutdown ( ) : void | ||
return | void |
public handleUncaught ( Exception $exception ) : |
||
$exception | Exception | |
return |
protected makeFatalErrorException ( ) : Symfony\Component\Debug\Exception\FatalErrorException | null | ||
return | Symfony\Component\Debug\Exception\FatalErrorException | null |
protected makeResponse ( mixed $response, Exception $exception ) : |
||
$response | mixed | |
$exception | Exception | |
return |
protected matchesTypehint ( callable | Autarky\Errors\ErrorHandlerInterface $handler, Exception $exception ) : boolean | ||
$handler | callable | Autarky\Errors\ErrorHandlerInterface | |
$exception | Exception | |
return | boolean |
public setDefaultHandler ( Autarky\Errors\ErrorHandlerInterface $handler ) | ||
$handler | Autarky\Errors\ErrorHandlerInterface |
public throwFatalErrorException ( ) : void | ||
return | void |
protected ErrorHandlerInterface,Autarky\Errors|null $defaultHandler | ||
return | Autarky\Errors\ErrorHandlerInterface | null |
protected HandlerResolver,Autarky\Errors $resolver | ||
return |
protected bool $rethrow | ||
return | boolean |