PHPackages                             ignaszak/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. ignaszak/exception

Abandoned → [ignaszak/error-handler](/?search=ignaszak%2Ferror-handler)Library[Logging &amp; Monitoring](/categories/logging)

ignaszak/exception
==================

Exception Handler

v1.1.2(10y ago)02551MITPHPPHP &gt;=7.0

Since Dec 11Pushed 8y ago1 watchersCompare

[ Source](https://github.com/ignaszak/php-exception)[ Packagist](https://packagist.org/packages/ignaszak/exception)[ RSS](/packages/ignaszak-exception/feed)WikiDiscussions master Synced 2d ago

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

ignaszak/exception
==================

[](#ignaszakexception)

[![Build Status](https://camo.githubusercontent.com/3d163dd7826827b0f6b64b8eac6357e59123c66d21accb02e08eabfa09134b89/68747470733a2f2f7472617669732d63692e6f72672f69676e61737a616b2f7068702d657863657074696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ignaszak/php-exception) [![Coverage Status](https://camo.githubusercontent.com/0181cac3f616e52ac8be343f71e1a70aef4b01c2e82006d6e6029a299cd214af/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f69676e61737a616b2f7068702d657863657074696f6e2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/ignaszak/php-exception?branch=master)

This package provides error handler interface

[![Screnshot](screenshot1.jpg)](screenshot1.jpg)

Installing
----------

[](#installing)

The package is avilable via [Composer/Packagist](https://packagist.org/packages/ignaszak/exception), so just add following lines to your composer.json file:

```
"require" : {
    "ignaszak/exception" : "*"
}
```

or:

```
php composer.phar require ignaszak/exception
```

Running Tests
-------------

[](#running-tests)

Just run phpunit from the working directory

```
php phpunit.phar
```

Requirments
-----------

[](#requirments)

php &gt;= 7.0

Example
-------

[](#example)

```
include __DIR__ . '/autoload.php';

$exception = new Ignaszak\Exception\Start;

// Set which PHP errors are reported
$exception->errorReporting = E_ALL;

// Set display mode if error occured:
//    'dev'      - full developer error interface
//    'user'     - simple message for users
//    'location' - redirect to oder site with custom error message
//    'none'     - set no display
$exception->display = 'dev';

// Set which PHP errors are displayed in 'user' or 'location' mode
$exception->userReporting = E_ALL & ~E_NOTICE;

// Set message for 'user' mode
$exception->userMessage = 'Error occured.';

// Set location adress for 'location' mode
$exception->userLocation = 'http://example.com';

// Create log file if error occured
$exception->createLogFile = true;

// Log files dir
$exception->logFileDir = __DIR__ . '/logs';

$exception->run();

// Make some errors
notice;

class Test {
    public function throwException()
    {
        throw new Exception('Test exception');
    }
}

try {
    (new Test)->throwException();
} catch (Exception $e) {
    $exception->catchException($e);
}

fatalError();
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

Total

4

Last Release

3804d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.5

v1.1.0PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/a4b982f3db3ce8473e32acea07930b0e0513b0facd39726bd493abb0357fbd8c?d=identicon)[ignaszak](/maintainers/ignaszak)

---

Top Contributors

[![ignaszak](https://avatars.githubusercontent.com/u/13788056?v=4)](https://github.com/ignaszak "ignaszak (45 commits)")

---

Tags

exceptionerrorhandler

### Embed Badge

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

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

###  Alternatives

[drupal/core-dev

require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.

2022.6M344](/packages/drupal-core-dev)[justbetter/magento2-sentry

Magento 2 Logger for Sentry

1861.6M3](/packages/justbetter-magento2-sentry)[facile-it/sentry-module

This module allows integration of Sentry Client into laminas and mezzio

21400.3k](/packages/facile-it-sentry-module)[baibaratsky/yii2-rollbar

Rollbar for Yii2

36133.0k](/packages/baibaratsky-yii2-rollbar)[phptek/sentry

Sentry.io integration for SilverStripe. Binds Sentry.io to SilverStripe's error &amp; exception handling subsystem.

16210.6k4](/packages/phptek-sentry)

PHPackages © 2026

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