setbased/error-handler 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱: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
  • 点击次数: 3
  • 依赖项目数: 12
  • 推荐数: 0

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固