Name: whoops
Owner: Middlewares
Description: PSR-15 middleware to use Whoops as error handler
Created: 2016-10-02 10:25:40.0
Updated: 2018-05-23 20:22:26.0
Pushed: 2018-05-23 20:25:59.0
Size: 36
Language: PHP
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Middleware to use Whoops as error handler.
This package is installable and autoloadable via Composer as middlewares/whoops.
oser require middlewares/whoops
patcher = new Dispatcher([
new Middlewares\Whoops()
ponse = $dispatcher->dispatch(new ServerRequest());
__construct(Whoops\Run $whoops = null, Whoops\Util\SystemFacade $system = null)
Allows to provide a custom Whoops\Run
instance. If it's not defined, creates an instance automatically. You can provide also the SystemFacade
used by the Run
instance, in order to implement a special behaviour with fatal errors.
catchErrors(true)
To catch not only throwable exceptions, but also php errors. This makes whoops to be registered temporary in order to capture the errors using set_error_handler
. It's enabled by default so, to disable it you have to use ->catchErrors(false)
;
handlerContainer(Psr\Container\ContainerInterface $container)
To define a custom PSR-11 container used to create the intance of Whoops\Handler\HandlerInterface
based in the Accept
header in the request.
Please see CHANGELOG for more information about recent changes and CONTRIBUTING for contributing details.
The MIT License (MIT). Please see LICENSE for more information.