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

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

haeckel/exception
=================

library that provides utilities and extensions for exceptions.

1.2.0(6mo ago)081LGPL-3.0-or-laterPHPPHP ^8.0CI passing

Since Sep 27Pushed 6mo agoCompare

[ Source](https://github.com/dhaeckel/php-exception)[ Packagist](https://packagist.org/packages/haeckel/exception)[ RSS](/packages/haeckel-exception/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (4)Used By (1)

[![codecov](https://camo.githubusercontent.com/3bfaf424d11ceb842485f31bd8d03165cf4aa1084bf6bd7f29890518e652157f/68747470733a2f2f636f6465636f762e696f2f6769746875622f64686165636b656c2f7068702d657863657074696f6e2f67726170682f62616467652e7376673f746f6b656e3d334d3345364e39594457)](https://codecov.io/github/dhaeckel/php-exception)[![ci](https://github.com/dhaeckel/php-exception/actions/workflows/php.yml/badge.svg)](https://github.com/dhaeckel/php-exception/actions/workflows/php.yml)[![Static Badge](https://camo.githubusercontent.com/14995ff65edea59395c224e37e4fc66f91c1e601c1a58311e3c6f38c4fe37feb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c2532306d61782d627269676874677265656e)](phpstan.dist.neon)[![Static Badge](https://camo.githubusercontent.com/b4dd7de37447bf201a1b6bfa4758fb5e24cbf79eb4f9c412a7705ec1b17315bf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d7374726963745f72756c65732d627269676874677265656e)](https://camo.githubusercontent.com/b4dd7de37447bf201a1b6bfa4758fb5e24cbf79eb4f9c412a7705ec1b17315bf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d7374726963745f72756c65732d627269676874677265656e)[![Packagist License](https://camo.githubusercontent.com/590c38dd8ddb68ea7bfdea34654623b5afae5c05cf9393e2e6712e4dd00f623d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f686165636b656c2f657863657074696f6e)](https://camo.githubusercontent.com/590c38dd8ddb68ea7bfdea34654623b5afae5c05cf9393e2e6712e4dd00f623d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f686165636b656c2f657863657074696f6e)

Haeckel/php-exception
=====================

[](#haeckelphp-exception)

Haeckel/php-exception is a php library that provides utilities and extensions for exceptions.

Features
--------

[](#features)

- [Utilities](src/Util) to make working with exceptions easier:

    - [MessageProvider](src/Util/MsgProvider.php): Provide common exception message templates to have consistent exception messages.
- Extensions:

    - [LogCtxAware](src/LogCtxAware): Exceptions that contain an array, to capture the context when the exception is thrown. This context can then be passed to a psr/log compatible logger.

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

[](#installation)

Install the package vai composer by running:

```
composer require haeckel/exception
```

Contribute
----------

[](#contribute)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

[Source Code](https://github.com/dhaeckel/php-exception)

Support
-------

[](#support)

Let us know if you have issues.

[Issue Tracker](https://github.com/dhaeckel/php-exception/issues)

License
-------

[](#license)

[LGPL-3.0-or-later](COPYING.LESSER)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance68

Regular maintenance activity

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity42

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

Total

3

Last Release

186d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/86be890d6b82e0a0048eeebc88672c30efa3ddc68982adfde0b54d8230d763dc?d=identicon)[dhaeckel](/maintainers/dhaeckel)

---

Top Contributors

[![dhaeckel](https://avatars.githubusercontent.com/u/65503128?v=4)](https://github.com/dhaeckel "dhaeckel (20 commits)")

---

Tags

logloggingexception

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[monolog/monolog

Sends your logs to files, sockets, inboxes, databases and various web services

21.4k964.9M7.0k](/packages/monolog-monolog)[symfony/monolog-bundle

Symfony MonologBundle

2.9k249.1M1.6k](/packages/symfony-monolog-bundle)[sentry/sentry

PHP SDK for Sentry (http://sentry.io)

1.9k227.1M273](/packages/sentry-sentry)[sentry/sentry-laravel

Laravel SDK for Sentry (https://sentry.io)

1.3k114.3M154](/packages/sentry-sentry-laravel)[rap2hpoutre/laravel-log-viewer

A Laravel log reader

3.2k14.7M71](/packages/rap2hpoutre-laravel-log-viewer)[sentry/sdk

This is a meta package of sentry/sentry. We recommend using sentry/sentry directly.

328134.8M151](/packages/sentry-sdk)

PHPackages © 2026

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