primal/errorhandler
最新稳定版本:v1.0.0
Composer 安装命令:
composer require primal/errorhandler
包简介
Quick trigger class for handling all errors and exceptions internally. Defaults to outputting as JSON data
README 文档
README
Simple to use class for catching all uncaught errors for processing. By default the class outputs the error as JSON, but that behavior can be overridden with a custom callback. Designed to help with error reporting when building APIs, but useful in generic application settings as well. Handles Exceptions, Runtime Errors and Fatal Errors
##Usage
//defaults to outputting errors as application/json
\Primal\ErrorHandler::Init();
//override with a custom callback to write to a log file
\Primal\ErrorHandler::Init(function ($error) {
error_log(json_encode($error), 0, '/path/to/error/log');
});
统计信息
- 总下载量: 36
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2012-11-23