承接 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.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04