Download the PHP package nordsoftware/lumen-chained-exception-handler without Composer
On this page you can find all versions of the php package nordsoftware/lumen-chained-exception-handler. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nordsoftware/lumen-chained-exception-handler
More information about nordsoftware/lumen-chained-exception-handler
Files in nordsoftware/lumen-chained-exception-handler
Package lumen-chained-exception-handler
Short Description A chained exception handler for the Lumen framework
License MIT
Informations about the package lumen-chained-exception-handler
lumen-chained-exception-handler
This utility allows you to chain together multiple exception handlers in your Lumen application. This can be useful if you want to use the rendering capabilities of the default exception handler, but you want to use the reporting logic from a third-party exception handler. The reporting logic can usually be extended by adding another Monolog handler, but all exceptions will be mangled into strings which is not always feasible.
Installation
Run the following command to install the package through Composer:
Usage
Replace the $app->singleton()
call which registers the concrete exception handler in bootstrap/app.php
with the
following:
The constructor takes two parameters, a primary exception handler and an optional array of secondary handlers. The
report()
method will be called on all handlers, but the render()
and renderForConsole()
methods will only be
called on the primary handler.
For example, if want to use the default Laravel\Lumen\Exceptions\Handler
as your primary error handler and
Foo\Bar\ExceptionHandler
and Baz\ExceptionHandler
as secondary exception handlers, you would use this:
Running tests
Clone the project and install its dependencies by running:
Run the following command to run the test suite:
License
See LICENSE