定制 setbased/error-handler 二次开发

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

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

setbased/error-handler

最新稳定版本:1.4.0

Composer 安装命令:

composer require setbased/error-handler

包简介

An error handler

README 文档

README

An error handler for PHP.

Social Legal Release Tests
Gitter License Latest Stable Version
Build Status
Code Coverage

PHP is a great language, however is has some quirks. One of them is that PHP has two mechanisms for signaling errors: exceptions and warnings. The following code will by default not raise an exception:

$handle = fopen('no-such-file.txt', 'r');

It will generate a waring (which is most like to be suppressed) and return false.

This library will throw exceptions in case like above instead of generating warnings.

Manual

Add the following code at the beginning of your PHP script to throw exceptions (when possible) when a PHP warning, error, or notice occurs.

use SetBased\ErrorHandler\ErrorHandler;

$handler = new ErrorHandler();
$handler->registerErrorHandler(); 

Installation

This package can be installed using composer:

composer require setbased/error-handler

Or you can obtain the sources at GitHub.

License

This project is licensed under the terms of the MIT license.

统计信息

  • 总下载量: 25.05k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 12
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-09-10