PHPackages                             lupferjoel/lumen-chained-exception-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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. lupferjoel/lumen-chained-exception-handler

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

lupferjoel/lumen-chained-exception-handler
==========================================

A chained exception handler for the Lumen framework

4.0.2(4y ago)01.4k1MITPHPPHP ^7.3 | ^8.0

Since Dec 9Pushed 4y agoCompare

[ Source](https://github.com/lupferjoel/lumen-chained-exception-handler)[ Packagist](https://packagist.org/packages/lupferjoel/lumen-chained-exception-handler)[ RSS](/packages/lupferjoel-lumen-chained-exception-handler/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (9)Used By (1)

lumen-chained-exception-handler
===============================

[](#lumen-chained-exception-handler)

[![GitHub Actions status](https://github.com/digiaonline/lumen-chained-exception-handler/workflows/Test/badge.svg)](https://github.com/digiaonline/lumen-chained-exception-handler/actions)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/9bad3cf40bf6bb19741f2204892ccbff469b5a48d356a61ac0b1ab8cf0c15fd1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f64696769616f6e6c696e652f6c756d656e2d636861696e65642d657863657074696f6e2d68616e646c65722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/digiaonline/lumen-chained-exception-handler/?branch=master)[![Coverage Status](https://camo.githubusercontent.com/4fb078b7a24b09a282ddf3a1db0b03bd3f88ad2c4fadfbdc0a1c5a69b10d462d/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f64696769616f6e6c696e652f6c756d656e2d636861696e65642d657863657074696f6e2d68616e646c65722f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/digiaonline/lumen-chained-exception-handler?branch=master)[![Code Climate](https://camo.githubusercontent.com/62523d12eca839bb643baef653fd14006f2811bad52a1b58b08b40e0e891da96/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f64696769616f6e6c696e652f6c756d656e2d636861696e65642d657863657074696f6e2d68616e646c65722f6261646765732f6770612e737667)](https://codeclimate.com/github/digiaonline/lumen-chained-exception-handler)

This utility allows you to chain together multiple exception handlers in your Lumen application. This can be useful if you want to use the rendering capabilities of the default exception handler, but you want to use the reporting logic from a third-party exception handler. The reporting logic can usually be extended by adding another Monolog handler, but all exceptions will be mangled into strings which is not always feasible.

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

[](#installation)

Run the following command to install the package through Composer:

```
composer require lupferjoel/lumen-chained-exception-handler
```

Usage
-----

[](#usage)

Replace the `$app->singleton()` call which registers the concrete exception handler in `bootstrap/app.php` with the following:

```
$app->instance(
    Illuminate\Contracts\Debug\ExceptionHandler::class,
    new Nord\Lumen\ChainedExceptionHandler\ChainedExceptionhandler(
        new App\Exceptions\Handler()
    )
);
```

The constructor takes two parameters, a primary exception handler and an optional array of secondary handlers. The `report()` method will be called on all handlers, but the `render()` and `renderForConsole()` methods will only be called on the primary handler.

For example, if want to use the default `Laravel\Lumen\Exceptions\Handler` as your primary error handler and `Foo\Bar\ExceptionHandler` and `Baz\ExceptionHandler` as secondary exception handlers, you would use this:

```
$app->instance(
    Illuminate\Contracts\Debug\ExceptionHandler::class,
    new Nord\Lumen\ChainedExceptionHandler\ChainedExceptionhandler(
        new Laravel\Lumen\Exceptions\Handler(),
        [new Foo\Bar\ExceptionHandler(), new Baz\ExceptionHandler()]
    )
);
```

Running tests
-------------

[](#running-tests)

Clone the project and install its dependencies by running:

```
composer install
```

Run the following command to run the test suite:

```
vendor/bin/phpunit
```

License
-------

[](#license)

See [LICENSE](LICENSE)

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~203 days

Total

8

Last Release

1582d ago

Major Versions

1.0.3 → 2.0.02020-09-21

2.0.0 → 3.0.02021-11-11

3.0.0 → 4.0.02022-03-03

PHP version history (3 changes)1.0.0PHP &gt;=5.6.4

2.0.0PHP ^7.2

3.0.0PHP ^7.3 | ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/54706581?v=4)[Joel Lupfer](/maintainers/lupferjoel)[@lupferjoel](https://github.com/lupferjoel)

---

Top Contributors

[![hugovk](https://avatars.githubusercontent.com/u/1324225?v=4)](https://github.com/hugovk "hugovk (10 commits)")[![Jalle19](https://avatars.githubusercontent.com/u/1106133?v=4)](https://github.com/Jalle19 "Jalle19 (6 commits)")[![lupferjoel](https://avatars.githubusercontent.com/u/54706581?v=4)](https://github.com/lupferjoel "lupferjoel (5 commits)")[![ls-renaud-tilte](https://avatars.githubusercontent.com/u/47116999?v=4)](https://github.com/ls-renaud-tilte "ls-renaud-tilte (4 commits)")[![Casterke](https://avatars.githubusercontent.com/u/7291042?v=4)](https://github.com/Casterke "Casterke (1 commits)")[![realFlowControl](https://avatars.githubusercontent.com/u/14161194?v=4)](https://github.com/realFlowControl "realFlowControl (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lupferjoel-lumen-chained-exception-handler/health.svg)

```
[![Health](https://phpackages.com/badges/lupferjoel-lumen-chained-exception-handler/health.svg)](https://phpackages.com/packages/lupferjoel-lumen-chained-exception-handler)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M164](/packages/spatie-laravel-health)[illuminate/log

The Illuminate Log package.

6225.3M622](/packages/illuminate-log)[spatie/laravel-flare

Send Laravel errors to Flare

111.4M7](/packages/spatie-laravel-flare)

PHPackages © 2026

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