slick/error-handler
最新稳定版本:v0.4.0
Composer 安装命令:
composer require slick/error-handler
包简介
PHP Error Handler module that captures and displays all throwable errors in a given format, making debugging easier and more efficient
README 文档
README
This custom PHP Error Handler is designed to intercept and manage all throwable errors, including exceptions and fatal errors providing a robust and user-friendly error handling experience. The module captures detailed error information and presents it within a well-structured template, offering clear and concise feedback to developers. This enhances debugging by displaying the error type, message, file, line number, and a stack trace, all within an aesthetically pleasing and easily navigable interface. This approach ensures a smooth user experience while simplifying error diagnosis and resolution for developers.
This package is compliant with PSR-2 code standards and PSR-4 autoload standards. It also applies the semantic version 2.0.0 specification.
Install
Via Composer
$ composer require slick/error-handler
Usage
In you startup script add the following:
// index.php <?php use Slick\ErrorHandler\Runner; use Slick\ErrorHandler\Util\SystemFacade; require_once 'vendor/autoload.php'; $runner = new Runner(new SystemFacade()); $runner->pushHandler(fn (Throwable $throwable) => echo $throwable->getMessage()) ->register();
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email slick.framework@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 941
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-08-21