PHPackages                             primal/errorhandler - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. primal/errorhandler

AbandonedLibrary[HTTP &amp; Networking](/categories/http)

primal/errorhandler
===================

Quick trigger class for handling all errors and exceptions internally. Defaults to outputting as JSON data

v1.0.0(13y ago)5361MITPHPPHP &gt;=5.3.10

Since Dec 1Pushed 13y ago1 watchersCompare

[ Source](https://github.com/PrimalPHP/ErrorHandler)[ Packagist](https://packagist.org/packages/primal/errorhandler)[ Docs](http://github.com/PrimalPHP/ErrorHandler)[ RSS](/packages/primal-errorhandler/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

ErrorHandler
============

[](#errorhandler)

Simple to use class for catching all uncaught errors for processing. By default the class outputs the error as JSON, but that behavior can be overridden with a custom callback. Designed to help with error reporting when building APIs, but useful in generic application settings as well. Handles Exceptions, Runtime Errors and Fatal Errors

\##Usage

```
//defaults to outputting errors as application/json
\Primal\ErrorHandler::Init();

//override with a custom callback to write to a log file
\Primal\ErrorHandler::Init(function ($error) {
    error_log(json_encode($error), 0, '/path/to/error/log');
});

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

4917d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/31834882?v=4)[ChiperSoft](/maintainers/ChiperSoft)[@ChiperSoft](https://github.com/ChiperSoft)

---

Top Contributors

[![Twipped](https://avatars.githubusercontent.com/u/231157?v=4)](https://github.com/Twipped "Twipped (6 commits)")

---

Tags

httpjsonerrorexceptionscrash

### Embed Badge

![Health badge](/badges/primal-errorhandler/health.svg)

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

###  Alternatives

[jacwright/restserver

php rest server for very light-weight REST APIs

51070.0k3](/packages/jacwright-restserver)[jsor/hal-client

A lightweight client for consuming and manipulating Hypertext Application Language (HAL) resources.

2425.9k1](/packages/jsor-hal-client)[rap2hpoutre/jacky

Opinionated REST JSON HTTP API client for laravel

174.4k](/packages/rap2hpoutre-jacky)

PHPackages © 2026

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