PHPackages                             yuyue8/tp\_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. yuyue8/tp\_exception

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

yuyue8/tp\_exception
====================

thinkphp exception

v1.0.1(2y ago)017Apache-2.0PHPPHP &gt;=8.0.2

Since Jun 2Pushed 2y ago1 watchersCompare

[ Source](https://github.com/yuyue8/tp_exception)[ Packagist](https://packagist.org/packages/yuyue8/tp_exception)[ RSS](/packages/yuyue8-tp-exception/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

TpException
===========

[](#tpexception)

安装
--

[](#安装)

```
composer require yuyue8/tp_exception

```

使用方法
----

[](#使用方法)

安装后默认使用 `Yuyue8\TpException\basic\BaseException` 类为异常处理类

若需要自定义，可以创建自定义异常处理类，继承`Yuyue8\TpException\basic\BaseException`， 同时在`tp_config`配置文件中设置`base_exception_class`参数，值为自定义类

创建异常类：

```
php think make:exception /app/exception/Admin

```

使用异常类：

```
throw new AdminException('错误信息');

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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 ~265 days

Total

2

Last Release

807d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/53282d9e2a3bfccaf3b02ed4e2f1ede03c83141441299709b10a47d6392cc25a?d=identicon)[yuyue8](/maintainers/yuyue8)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/yuyue8-tp-exception/health.svg)

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

###  Alternatives

[topthink/think-captcha

captcha package for thinkphp

132934.4k67](/packages/topthink-think-captcha)[topthink/think-worker

workerman extend for thinkphp

202227.2k9](/packages/topthink-think-worker)[yunwuxin/think-cron

计划任务

17416.2k](/packages/yunwuxin-think-cron)[zzstudio/think-addons

The ThinkPHP6 Addons Package

1518.6k](/packages/zzstudio-think-addons)[topthink/think-annotation

Annotation For ThinkPHP

4831.5k8](/packages/topthink-think-annotation)[liliuwei/thinkphp-jump

适用于thinkphp6.0的跳转扩展

2874.4k1](/packages/liliuwei-thinkphp-jump)

PHPackages © 2026

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