PHPackages                             ping-qu/exception - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ping-qu/exception

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ping-qu/exception
=================

pingqu exception php library

0.0.1(9y ago)04344LGP-2.1PHPPHP &gt;=5.3

Since Jun 15Pushed 9y ago3 watchersCompare

[ Source](https://github.com/ping-qu/exception-php)[ Packagist](https://packagist.org/packages/ping-qu/exception)[ RSS](/packages/ping-qu-exception/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)DependenciesVersions (2)Used By (4)

pingqu exception
================

[](#pingqu-exception)

Installation - 安装
-----------------

[](#installation---安装)

```
composer require ping-qu/exception
```

Usage - 使用
----------

[](#usage---使用)

### 1、抛出异常

[](#1抛出异常)

```
throw new \Pingqu\Exception\Error("测试一个异常", 'TEST_A_EXCEPTION');
```

### 2、抛出自定义继承异常

[](#2抛出自定义继承异常)

```
class UserError extends \Pingqu\Exception\Error
{
  // 魔术方法
  public function __construct( $message = 'Unknown Error' , $errorId = 'UNKNOWN_ERROR' , $code = '400', $errorData = array() )
  {
    parent::__construct( $message , $errorId , $code, $errorData );
  }
}

throw new UserError("测试一个异常", 'TEST_A_EXCEPTION');
```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community15

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

Unknown

Total

1

Last Release

3302d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20659595?v=4)[linyueb](/maintainers/linyueb)[@linyueb](https://github.com/linyueb)

![](https://www.gravatar.com/avatar/037047abd1a3166edcf84f77f2db49408cd2205c76efdac55bb49413fbb06f65?d=identicon)[yuchonghua](/maintainers/yuchonghua)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/ping-qu-exception/health.svg)

```
[![Health](https://phpackages.com/badges/ping-qu-exception/health.svg)](https://phpackages.com/packages/ping-qu-exception)
```

###  Alternatives

[tedivm/jshrink

Javascript Minifier built in PHP

76239.0M172](/packages/tedivm-jshrink)

PHPackages © 2026

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