PHPackages                             niels-nijens/failurehandling - 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. niels-nijens/failurehandling

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

niels-nijens/failurehandling
============================

An error and exception handling library for PHP 5.3+

2.0.0(12y ago)214[6 issues](https://github.com/niels-nijens/FailureHandling/issues)[2 PRs](https://github.com/niels-nijens/FailureHandling/pulls)MITPHPPHP &gt;=5.3.3

Since Sep 16Pushed 10y ago1 watchersCompare

[ Source](https://github.com/niels-nijens/FailureHandling)[ Packagist](https://packagist.org/packages/niels-nijens/failurehandling)[ Docs](https://github.com/niels-nijens/FailureHandling)[ RSS](/packages/niels-nijens-failurehandling/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (4)Versions (3)Used By (0)

FailureHandling
===============

[](#failurehandling)

An error and exception handling library for PHP 5.3+

[![Build Status](https://camo.githubusercontent.com/05aeeb9a605ca8308324ac5c4c16a13468051d3c404dc6631254bd9172759f56/68747470733a2f2f7472617669732d63692e6f72672f6e69656c732d6e696a656e732f4661696c75726548616e646c696e672e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/niels-nijens/FailureHandling)[![Coverage Status](https://camo.githubusercontent.com/5188aad6ae55e03200b9544044af4b272338cbf426a54a8923d43a362a89e124/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6e69656c732d6e696a656e732f4661696c75726548616e646c696e672f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/niels-nijens/FailureHandling?branch=master)[![SensioLabsInsight](https://camo.githubusercontent.com/b70de966102c79b5a7f7cc6e3e9e3d812ae6510cd4b777ecd32e7198a29a268a/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f33323039643737362d323037652d343030662d623435652d6630303362623266336264652f6d696e692e706e67)](https://insight.sensiolabs.com/projects/3209d776-207e-400f-b45e-f003bb2f3bde)[![Latest Stable Version](https://camo.githubusercontent.com/b7a91de0140e9c83e49135a90af571742aea7266af11864254d804da8cb7dc4b/68747470733a2f2f706f7365722e707567782e6f72672f6e69656c732d6e696a656e732f6661696c75726568616e646c696e672f762f737461626c652e706e67)](https://packagist.org/packages/niels-nijens/failurehandling)

Installation using Composer
---------------------------

[](#installation-using-composer)

Run the following command to add the package to your composer.json:

```
composer require niels-nijens/failurehandling

```

This library also requires a [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) compatible logger like [niels-nijens/Logging](https://github.com/niels-nijens/Logging) or [Monolog](https://github.com/Seldaek/monolog) for the actual logging of errors and exceptions.

Usage
-----

[](#usage)

To activate handling of errors and exceptions, see the following example code.

```
use Nijens\FailureHandling\FailureCatcher;
use Nijens\FailureHandling\Handlers\DefaultFailureHandler;
use Nijens\Logging\Logger; // Not included in this library

$logger = new Logger(); // Not included in this library

$failureHandler = new DefaultFailureHandler();
$failureHandler->setLogger($logger);

FailureCatcher::start($failureHandler);
```

About
-----

[](#about)

This is one of the AtomicPHP library series trying to achieve ultimate flexibility for PHP developers through [separation of concerns](http://en.wikipedia.org/wiki/Separation_of_concerns).

##### Versioning

[](#versioning)

FailureHandling uses [Semantic Versioning 2](http://semver.org/) as guideline for new versions.

##### License

[](#license)

FailureHandling is licensed under the MIT License - see the `LICENSE` file for details.

##### Author

[](#author)

Niels Nijens -

##### Acknowledgements

[](#acknowledgements)

This library is inspired by an idea about error and exception handling of [Giso Stallenberg](//github.com/gisoconnectholland).

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Total

2

Last Release

4487d ago

Major Versions

1.0.0 → 2.0.02014-01-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/3d9f8b726bd45ba463415d96703283e6aa05193cb1fe3b61aa8adb018378a51a?d=identicon)[niels-nijens](/maintainers/niels-nijens)

---

Top Contributors

[![niels-nijens](https://avatars.githubusercontent.com/u/3245362?v=4)](https://github.com/niels-nijens "niels-nijens (53 commits)")

---

Tags

loggingerrorexceptionsErrorhandlingFailurehandling

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/niels-nijens-failurehandling/health.svg)

```
[![Health](https://phpackages.com/badges/niels-nijens-failurehandling/health.svg)](https://phpackages.com/packages/niels-nijens-failurehandling)
```

###  Alternatives

[sentry/sentry

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

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

Monitors errors and exceptions and reports them to Rollbar

33723.7M82](/packages/rollbar-rollbar)[bugsnag/bugsnag-laravel

Official Bugsnag notifier for Laravel applications.

90234.6M36](/packages/bugsnag-bugsnag-laravel)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[bugsnag/bugsnag

Official Bugsnag notifier for PHP applications.

56347.0M78](/packages/bugsnag-bugsnag)[analog/analog

Fast, flexible, easy PSR-3-compatible PHP logging package with dozens of handlers.

3451.5M24](/packages/analog-analog)

PHPackages © 2026

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