PHPackages                             dmitry-suffi/error-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. dmitry-suffi/error-handler

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

dmitry-suffi/error-handler
==========================

Error handler

1.0.0(9y ago)0841MITPHPPHP &gt;=7.0.0

Since Jan 11Pushed 7y ago1 watchersCompare

[ Source](https://github.com/dmitry-suffi/error-handler)[ Packagist](https://packagist.org/packages/dmitry-suffi/error-handler)[ Docs](https://github.com/dmitry-suffi/error-handler)[ RSS](/packages/dmitry-suffi-error-handler/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

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

[](#errorhandler)

Error handling php. Can use any logger psr-3 for logging errors.

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

[](#installation)

```
composer require dmitry-suffi/error-handler

```

connection example
------------------

[](#connection-example)

```
$handler = new \suffi\ErrorHandler\ErrorHandler();

set_error_handler([$handler, 'errorHandler']);
set_exception_handler([$handler, 'exceptionHandler']);
```

Setting
-------

[](#setting)

Debug mode. Displays error details.

```
$handler->debug = true;
```

Error Logging. Can use any logger psr-3 for logging errors.

```
$handler->writeLog = true;

$handler->logger = $logger;
```

Writing to the log information

```
$handler->$debugLog = true;
```

When you inherit from the class, you can change the way display messages to the user fault conditioning.

```
    //Page with an error message
    protected function htmlError(string $errstr)
    {
        return $errstr;
    }

    //Report an error for ajax-request
    protected function jsonError(string $errstr)
    {
        return json_encode(['error' => $errstr]);
    }
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

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

3450d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2721e2bebe88679b1fc4abe763d5a9cccee0aa9148b71545c24802ce9ae41ff7?d=identicon)[dmitry-suffi](/maintainers/dmitry-suffi)

---

Top Contributors

[![dmitry-suffi](https://avatars.githubusercontent.com/u/10375400?v=4)](https://github.com/dmitry-suffi "dmitry-suffi (4 commits)")

---

Tags

errorhandlererrorhandler

### Embed Badge

![Health badge](/badges/dmitry-suffi-error-handler/health.svg)

```
[![Health](https://phpackages.com/badges/dmitry-suffi-error-handler/health.svg)](https://phpackages.com/packages/dmitry-suffi-error-handler)
```

###  Alternatives

[sentry/sentry

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

1.9k240.0M314](/packages/sentry-sentry)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[illuminate/log

The Illuminate Log package.

6225.0M601](/packages/illuminate-log)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[api-platform/metadata

API Resource-oriented metadata attributes and factories

244.5M182](/packages/api-platform-metadata)[pagemachine/typo3-formlog

Form log for TYPO3

23233.9k7](/packages/pagemachine-typo3-formlog)

PHPackages © 2026

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