2017 © Pedro PelĂĄez
 

library whoops-stackphp

This package provides a StackPHP middleware for using the Whoops error handling library

image

mouf/whoops-stackphp

This package provides a StackPHP middleware for using the Whoops error handling library

  • Wednesday, April 20, 2016
  • by mouf
  • Repository
  • 16 Watchers
  • 13 Stars
  • 2,748 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 3 Forks
  • 1 Open issues
  • 3 Versions
  • 2 % Grown

The README.md

Whoops middleware for StackPHP

This package contains a StackPHP middleware that catches all exceptions and redirects those to the Whoops error handling library., (*1)

Installation

Through Composer as mouf/whoops-stackphp., (*2)

Usage

Simply use the WhoopsMiddleWare class in your middleware stack:, (*3)

use Whoops\StackPhp\WhoopsMiddleWare;

$router = new WhoopsMiddleWare(
    new MyOtherRouter(
        new YetAnotherRouter()));

If an exception is thrown, or an error is raised, Whoops will display a nice error message:, (*4)

Sample error screen, (*5)

The WhoopsMiddleWare constructor accepts 3 parameters:, (*6)

public function __construct(HttpKernelInterface $router, $catchExceptions = true, $catchErrors = true);
  • $router: this is the next router to be called on the Stack
  • $catchExceptions: Set to true to catch exception. Set to false to ignore exceptions (for production servers)
  • $catchErrors: Set to true to catch raised errors. Set to false to ignore raised errors (for production servers)

Note: $catchExceptions and $catchErrors can be passed a boolean, a callable (that returns a boolean) or a ConditionInterface that evaluates to true or false., (*7)

The Versions

20/04 2016

2.0.x-dev

2.0.9999999.9999999-dev https://github.com/thecodingmachine/whoops-library

This package provides a StackPHP middleware for using the Whoops error handling library

  Sources   Download

MIT

The Requires

 

stackphp whoops mouf

17/12 2014

1.0.x-dev

1.0.9999999.9999999-dev https://github.com/thecodingmachine/whoops-library

This package provides a StackPHP middleware for using the Whoops error handling library

  Sources   Download

MIT

The Requires

 

stackphp whoops mouf

17/12 2014

v1.0.0

1.0.0.0 https://github.com/thecodingmachine/whoops-library

This package provides a StackPHP middleware for using the Whoops error handling library

  Sources   Download

MIT

The Requires

 

stackphp whoops mouf