PHPackages                             jingwu/error - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. jingwu/error

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

jingwu/error
============

自定义错误处理

v0.3.0(7y ago)18MITPHPPHP &gt;=5.4.0

Since Nov 10Pushed 7y ago1 watchersCompare

[ Source](https://github.com/jingwu15/php_error)[ Packagist](https://packagist.org/packages/jingwu/error)[ Docs](https://github.com/jingwu15/php_error_handle.git)[ RSS](/packages/jingwu-error/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (4)Used By (0)

### 自定义PHP异常处理

[](#自定义php异常处理)

```
自定义PHP异常处理，并格式化输出，支持 CLI / HTML格式

```

#### 依赖

[](#依赖)

```
composer require jingwu/error

```

#### 使用

[](#使用)

```
//启用自定义错误处理
register_shutdown_function(array(new \Jingwu\Error\ErrorHandle(),'Shutdown'));
set_error_handler(array(new \Jingwu\Error\ErrorHandle(), 'Error'));
set_exception_handler(array(new \Jingwu\Error\ErrorHandle(),'Exception'));

//设置错误级别及显示方式：
error_reporting(E_ALL ^ E_WARNING ^ E_NOTICE ^ E_DEPRECATED);
ini_set("display_errors",    "On");
define('ERROR_DISPLAY_CLI',  true);
define('ERROR_DISPLAY_HTML', false);
define('SYS_KEY',            'order');

```

#### 测试

[](#测试)

```
include "vendor/autoload.php";

error_reporting(E_ALL);
//error_reporting(E_ALL ^ E_WARNING ^ E_NOTICE ^ E_DEPRECATED);
ini_set("display_errors",    "On");
define('ERROR_DISPLAY_CLI',  true);
define('ERROR_DISPLAY_HTML', false);
define('SYS_KEY',            'order');

register_shutdown_function(array(new \Jingwu\Error\ErrorHandle(),'Shutdown'));
set_error_handler(array(new \Jingwu\Error\ErrorHandle(), 'Error'));
set_exception_handler(array(new \Jingwu\Error\ErrorHandle(),'Exception'));

function dump() {
    var_dump($aa);
}

dump();
echo "\n\n";

```

```
at /data/code/jingwu/composerlib/php_error_handle/test.php 19
E_NOTICE: Undefined variable: aa
15:	set_exception_handler(array(new \Jingwu\Error\ErrorHandle(),'Exception'));
16:
17:
18:	function dump() {
19:	    var_dump($aa); //!!!please fix bug in here!!!
20:	}
21:
22:	dump();
23:	echo "\n\n";
24:	...
Trace:
#0 /data/code/jingwu/composerlib/php_error_handle/test.php(19): Jingwu\Error\ErrorHandle->Error([8,"Undefined variable: aa","\/data\/code\/jingwu\/composerlib\/php_error_handle\/test.php",19,[]])
#1 /data/code/jingwu/composerlib/php_error_handle/test.php(22): dump([])

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~5 days

Total

3

Last Release

2733d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/baef3aaa693e563cdfe7d3c3bff8fca86465387a5f889f0726420921c3709764?d=identicon)[jingwu15](/maintainers/jingwu15)

---

Top Contributors

[![jingwu15](https://avatars.githubusercontent.com/u/6680318?v=4)](https://github.com/jingwu15 "jingwu15 (2 commits)")

---

Tags

logexceptionerror

### Embed Badge

![Health badge](/badges/jingwu-error/health.svg)

```
[![Health](https://phpackages.com/badges/jingwu-error/health.svg)](https://phpackages.com/packages/jingwu-error)
```

###  Alternatives

[guanguans/laravel-exception-notify

Monitor exception and report to the notification channels(Log、Mail、AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、ZohoCliq、ZohoCliqWebHook、Zulip).

14642.7k1](/packages/guanguans-laravel-exception-notify)[baibaratsky/yii2-rollbar

Rollbar for Yii2

35130.5k](/packages/baibaratsky-yii2-rollbar)[facile-it/sentry-module

This module allows integration of Sentry Client into laminas and mezzio

19372.5k](/packages/facile-it-sentry-module)[phptek/sentry

Sentry.io integration for SilverStripe. Binds Sentry.io to SilverStripe's error &amp; exception handling subsystem.

15203.5k3](/packages/phptek-sentry)[crisu83/yii-sentry

Sentry for the Yii PHP framework.

1110.8k](/packages/crisu83-yii-sentry)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
