silencenjoyer/silence-error-handling
最新稳定版本:0.0.3
Composer 安装命令:
composer require silencenjoyer/silence-error-handling
包简介
Silence error handling system.
README 文档
README
The package is designed for centralised processing of errors and exceptions. It provides a readable view of errors.
This package is part of the monorepository silencenjoyer/silence, but can be used independently.
⚙️ Installation
composer require silencenjoyer/silence-error-handling
🚀 Quick start
<?php use Silence\ErrorHandler\ErrorHandler; use Silence\ErrorHandler\Renderers\HtmlRenderer; $errorHandler = new ErrorHandler(new HtmlRenderer()); $errorHandler->register();
🧱 Features:
- Interception of unhandled exceptions, compatible with PSR-15 middleware.
- Memory reserve to Avoid "Out of Memory" lockups
- Dynamic memory reserve adjustment
- Graceful fallback - When in non-debug mode, hides internal details.
- Detailed trace - When debug mode is enabled, provides full details.
- Shutdown error capture
- Unified rendering
🧪 Testing
php vendor/bin/phpunit
🧩 Use in the composition of Silence
The package is used to intercept errors in the Silence application.
If you are writing your own package, you can connect silencenjoyer/silence-error-handling for the same reason.
📄 License
This package is distributed under the MIT licence. For more details, see LICENSE.
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-07-18
