定制 primal/errorhandler 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 5
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-11-23