PHPackages                             letsface/php-error-handler - 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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. letsface/php-error-handler

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

letsface/php-error-handler
==========================

Exception handler for php to customise behavior given a specific exception code

v1.2(10y ago)026MITPHP

Since Jul 23Pushed 10y ago7 watchersCompare

[ Source](https://github.com/letsface/php-error-handler)[ Packagist](https://packagist.org/packages/letsface/php-error-handler)[ Docs](https://github.com/letsface/php-error-handler)[ RSS](/packages/letsface-php-error-handler/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

php-error-handler
=================

[](#php-error-handler)

Exception handler for php to customise behavior given a specific exception code

Usage
-----

[](#usage)

### Custom handler

[](#custom-handler)

```
$handler = new \Letsface\ExceptionHandler();
$handler->listen('123', function() {
  return 'foo';
});

try {
  throw new \MyException('', '123');
}
catch(\Exception $e) {
  // will echo "foo";
  echo $handler->handle($e);
}
```

### Throw an exception

[](#throw-an-exception)

```
$handler = new \Letsface\ExceptionHandler();
$handler->throws('123', new \AnotherException('My new message', 'NEWCODE'));

try {
  throw new \MyException('', '123');
}
catch(\Exception $e) {
  // will throw "\AnotherException";
  $handler->handle($e);
}
```

### Rethrow the exception

[](#rethrow-the-exception)

```
$handler = new \Letsface\ExceptionHandler();
$handler->rethrow('123');

try {
  throw new \MyException('', '123');
}
catch(\Exception $e) {
  // will throw $e;
  $handler->handle($e);
}
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

Established project with proven stability

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

Total

3

Last Release

3946d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/59a9b660716bb519730c11561d8a19d79f419735c7c0e908f23d8532fa2cc5d6?d=identicon)[sylvainv](/maintainers/sylvainv)

---

Top Contributors

[![sylvainv](https://avatars.githubusercontent.com/u/1049786?v=4)](https://github.com/sylvainv "sylvainv (3 commits)")

---

Tags

exception

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/letsface-php-error-handler/health.svg)

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

###  Alternatives

[filp/whoops

php error handling for cool kids

13.2k402.4M1.4k](/packages/filp-whoops)[yireo/magento2-whoops

Magento 2 module adding Whoops error handling

102703.5k](/packages/yireo-magento2-whoops)[jolicode/gif-exception-bundle

The GhostBuster of your exception page

20596.8k](/packages/jolicode-gif-exception-bundle)[ikkez/f3-falsum

Pretty error handling for Fat-Free Framework

21145.8k3](/packages/ikkez-f3-falsum)[kuria/error

Makes handling and debugging PHP errors suck less

1920.0k2](/packages/kuria-error)[thehocinesaad/laravel-error-ai

This package adds Ask AI button to the error page.

2214.4k](/packages/thehocinesaad-laravel-error-ai)

PHPackages © 2026

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