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 2d 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 52% 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

3998d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1049786?v=4)[Sylvain](/maintainers/sylvainv)[@sylvainv](https://github.com/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.6k429.7M1.5k](/packages/filp-whoops)[zeuxisoo/slim-whoops

PHP whoops error on slim framework

1371.1M27](/packages/zeuxisoo-slim-whoops)[yireo/magento2-whoops

Magento 2 module adding Whoops error handling

104756.6k](/packages/yireo-magento2-whoops)[oat-sa/tao-core

TAO core extension

66143.7k124](/packages/oat-sa-tao-core)[jolicode/gif-exception-bundle

The GhostBuster of your exception page

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

Pretty error handling for Fat-Free Framework

22149.2k3](/packages/ikkez-f3-falsum)

PHPackages © 2026

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