niels-nijens/failurehandling
Composer 安装命令:
composer require niels-nijens/failurehandling
包简介
An error and exception handling library for PHP 5.3+
README 文档
README
An error and exception handling library for PHP 5.3+
Installation using Composer
Run the following command to add the package to your composer.json:
composer require niels-nijens/failurehandling
This library also requires a PSR-3 compatible logger like niels-nijens/Logging or Monolog for the actual logging of errors and exceptions.
Usage
To activate handling of errors and exceptions, see the following example code.
use Nijens\FailureHandling\FailureCatcher; use Nijens\FailureHandling\Handlers\DefaultFailureHandler; use Nijens\Logging\Logger; // Not included in this library $logger = new Logger(); // Not included in this library $failureHandler = new DefaultFailureHandler(); $failureHandler->setLogger($logger); FailureCatcher::start($failureHandler);
About
This is one of the AtomicPHP library series trying to achieve ultimate flexibility for PHP developers through separation of concerns.
Versioning
FailureHandling uses Semantic Versioning 2 as guideline for new versions.
License
FailureHandling is licensed under the MIT License - see the LICENSE file for details.
Author
Niels Nijens - https://github.com/niels-nijens/
Acknowledgements
This library is inspired by an idea about error and exception handling of Giso Stallenberg.
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-01-29