PHPackages                             wecodein/error-handling - 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. wecodein/error-handling

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

wecodein/error-handling
=======================

Robust and extensible error handling system for PHP

681PHP

Since Nov 8Pushed 8y ago2 watchersCompare

[ Source](https://github.com/wecodein/error-handling)[ Packagist](https://packagist.org/packages/wecodein/error-handling)[ RSS](/packages/wecodein-error-handling/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

error-handling
==============

[](#error-handling)

[![Build Status](https://camo.githubusercontent.com/e23f2e066b65ce31cd36f5cf636735801d59149692e3a636cc69e0daacb4326d/68747470733a2f2f7472617669732d63692e6f72672f7765636f6465696e2f6572726f722d68616e646c696e672e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/wecodein/error-handling)[![Code Quality](https://camo.githubusercontent.com/186ba97b92299277703c83439813fd57eaa936f75cfbed07bf4ed2a974f52a9a/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7765636f6465696e2f6572726f722d68616e646c696e672e737667)](https://scrutinizer-ci.com/g/wecodein/error-handling)[![Code Coverage](https://camo.githubusercontent.com/5cda7cbfc48466b762601befb7393737dbea7bd23819c5d32d20be26d39992e4/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f7765636f6465696e2f6572726f722d68616e646c696e672e737667)](https://scrutinizer-ci.com/g/wecodein/error-handling/code-structure)[![Latest Version](https://camo.githubusercontent.com/ab6d2838d47b004216ccc16afc2f3fbdaff49bd9a60c1fc28d14f2661559af65/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7765636f6465696e2f6572726f722d68616e646c696e672e737667)](https://packagist.org/packages/wecodein/error-handling)[![PDS Skeleton](https://camo.githubusercontent.com/a8ce1f2a7b71f101b18fc0393ba5bf89b7a5b1f9d08a31b658ca0eab0064c0f6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7064732d736b656c65746f6e2d626c75652e737667)](https://github.com/php-pds/skeleton)

Installation
------------

[](#installation)

The preferred method of installation is via [Composer](http://getcomposer.org/). Run the following command to install the latest version of a package and add it to your project's `composer.json`:

```
composer require wecodein/error-handling
```

Usage
-----

[](#usage)

```
use WeCodeIn\ErrorHandling\Handler\ExceptionHandler;
use WeCodeIn\ErrorHandling\Handler\FatalErrorHandler;
use WeCodeIn\ErrorHandling\Handler\HandlerAggregate;
use WeCodeIn\ErrorHandling\Handler\ThrowableErrorHandler;
use WeCodeIn\ErrorHandling\Processor\CallableProcessor;

require __DIR__ . '/../vendor/autoload.php';

ini_set('log_errors', 0);
ini_set('display_errors', 0);

error_reporting(E_ALL);

$processor = new CallableProcessor(function (Throwable $throwable) : Throwable {
    // log, render...
    return $throwable;
});

$handler = new HandlerAggregate(
    new ThrowableErrorHandler(),
    new ExceptionHandler($processor),
    new FatalErrorHandler(20, $processor)
);

$handler->register();

trigger_error('Error');
```

Credits
-------

[](#credits)

- [Dusan Vejin](https://github.com/dutekvejin)
- [All Contributors](../../contributors)

License
-------

[](#license)

Released under MIT License - see the [License File](LICENSE) for details.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/41c86db15b024a226947adeb93c6f51e7373c81f863a193c5a073dd9a6ae1a9e?d=identicon)[dutekvejin](/maintainers/dutekvejin)

---

Top Contributors

[![dutekvejin](https://avatars.githubusercontent.com/u/119709?v=4)](https://github.com/dutekvejin "dutekvejin (8 commits)")[![nikolaposa](https://avatars.githubusercontent.com/u/6012807?v=4)](https://github.com/nikolaposa "nikolaposa (2 commits)")

---

Tags

error-handlingphp7

### Embed Badge

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

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

###  Alternatives

[symfony/stopwatch

Provides a way to profile code

2.8k387.2M918](/packages/symfony-stopwatch)[fruitcake/laravel-debugbar

PHP Debugbar integration for Laravel

19.1k662.9k29](/packages/fruitcake-laravel-debugbar)[spatie/ignition

A beautiful error page for PHP applications.

510147.6M69](/packages/spatie-ignition)[jokkedk/webgrind

Webgrind is a Xdebug profiling web frontend in PHP5. It implements a subset of the features of kcachegrind and installs in seconds and works on all platforms. For quick'n'dirty optimizations it does the job.

3.3k193.0k](/packages/jokkedk-webgrind)[koriym/printo

An object graph visualizer.

1421.8M2](/packages/koriym-printo)[soloterm/dumps

A Laravel command to intercept dumps from your Laravel application.

125285.7k3](/packages/soloterm-dumps)

PHPackages © 2026

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