dev-master
9999999-dev
MIT
The Requires
The Development Requires
0.0.2
0.0.2.0
MIT
The Requires
The Development Requires
0.0.1
0.0.1.0
MIT
The Requires
The Development Requires
Wallogit.com
2017 © Pedro Peláez
This project helps you to manage your exceptions with whoops., (*1)
whoops is an error handler base/framework for PHP. Out-of-the-box, it provides a pretty error interface that helps you debug your web projects, but at heart it's a simple yet powerful stacked error handling system., (*2)
This project constains a Penny event listener ready to use in your penny application., (*3)
composer require penny/excp-handler
The Penny Event Listener provided is a Penny\ExcpHandler\EventListener\WhoopsListener, which contains method onError($e) that can pass event that is a EventInterface implementation. You can set up whoops handlers by provide $current and $handlers parameter in contructor:, (*4)
public function __construct($current = "html", $handlers = [])
You may use default implementation by leave them as empty when create a Penny\ExcpHandler\EventListener\WhoopsListener instance., (*5)
config/di.php:use Penny\ExcpHandler\EventListener\WhoopsListener;
return [
'event_manager' => \DI\decorate(function($eventManager, $container) {
$eventManager->attach("dispatch_error", [$container->get(WhoopsListener::class), "onError"]);
// you may need to apply to '*_error' as well...
// other event here...
return $eventManager;
}),
WhoopsListener::class => \DI\object(WhoopsListener::class),
That's it. And you're ready to go., (*6)
MIT
MIT
MIT