Skip to content

dhazelett/stack-whoops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stack-Whoops

Stack Middleware for Whoops, the cool kids error handler.

Warning!

This Middleware has no tests. I really just wanted a middleware for whoops+stack. feel free to send a PR with tests if it's that important

Usage

use Silex\Application;
use Stack\Builder;

require_once '../app/config/bootstrap.php';

$app = new Application($config);

$stack = (new Builder)
    ->push('Saphire\Middleware\Whoops', [
        // STRING! name of the \Whoops\Handler\* to use
        'handler' => '\Whoops\Handler\PrettyPageHandler'
    ])
;

// Try it out
$app->get('/', function() {
    throw new \Exception('Oh No!');
});

$server = $stack->resolve($app);

$response = $server->handle($request)->send();

$server->terminate($request, $response);
MIT License

About

Stack Middleware for Whoops, the cool kids error handler.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages