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 today

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 51% 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

3360d 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

[bref/logger

All you need to log with Bref on AWS Lambda

341.4M6](/packages/bref-logger)[illuminated/console-logger

Logging and Notifications for Laravel Console Commands.

8674.5k](/packages/illuminated-console-logger)[bdk/debug

Browser/javascript like console class for PHP

808.9k1](/packages/bdk-debug)

PHPackages © 2026

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