mouf/whoops-stackphp
最新稳定版本:v1.0.0
Composer 安装命令:
composer require mouf/whoops-stackphp
包简介
This package provides a StackPHP middleware for using the Whoops error handling library
关键字:
README 文档
README
This package contains a StackPHP middleware that catches all exceptions and redirects those to the Whoops error handling library.
Installation
Through Composer as mouf/whoops-stackphp.
Usage
Simply use the WhoopsMiddleWare class in your middleware stack:
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:
The WhoopsMiddleWare constructor accepts 3 parameters:
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.
统计信息
- 总下载量: 5.66k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 14
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-12-17