PHPackages                             mabs/exceptionizer-bundle - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mabs/exceptionizer-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

mabs/exceptionizer-bundle
=========================

This bundle provides a simple way to play with php Exceptions.

17PHP

Since Jul 7Pushed 10y ago1 watchersCompare

[ Source](https://github.com/kernel64/exceptionizer-bundle)[ Packagist](https://packagist.org/packages/mabs/exceptionizer-bundle)[ RSS](/packages/mabs-exceptionizer-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

exceptionizer-bundle [![SensioLabsInsight](https://camo.githubusercontent.com/928177c91e41507774a79c1e45b9d69b4a8392b696035cc97fcd11c3b652e782/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f32653361633239632d623162372d343963302d383661662d3633343962353864346238382f6269672e706e67)](https://insight.sensiolabs.com/projects/2e3ac29c-b1b7-49c0-86af-6349b58d4b88)
=======================================================================================================================================================================================================================================================================================================================================================================================================

[](#exceptionizer-bundle-----)

[![Build Status](https://camo.githubusercontent.com/7c4e40eef4b041ddcf9e96701cd418e54d0631ac583c2d1d83c3f6bf0791c0e9/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6b65726e656c36342f657863657074696f6e697a65722d62756e646c652f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/kernel64/exceptionizer-bundle/build-status/master) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/2211385d0209a1fb4cbe4d15e89eca14ad3c19ab7f31e876c706d073edaac9b5/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6b65726e656c36342f657863657074696f6e697a65722d62756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/kernel64/exceptionizer-bundle/?branch=master)

Play with Exceptions :D This bundle help to get a low coupling between exception class object in your code

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

[](#installation)

Exceptionizer uses Composer, please checkout the [composer website](http://getcomposer.org) for more information.

The simple following command will install `exceptionizer-bundle` into your project. It also add a new entry in your `composer.json` and update the `composer.lock` as well.

```
$ composer require 'mabs/exceptionizer-bundle'
```

Then, you can enable it in your kernel:

```
// app/AppKernel.php
public function registerBundles()
{
    $bundles = array(
        ...
        new Mabs\ExceptionizerBundle\MabsExceptionizerBundle(),
        ...
```

Usage
-----

[](#usage)

Now you can use Exceptionizer service to throw Exceptions:

```
$this->container->get('exceptionizer')
->throwException('\\Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException', array('Your message'));
```

OR define your Exception in your config.yml file like this :

```
mabs_exceptionizer:
    exceptions:
        bar_code_exception:
            class: Mabs\BarCodeBundle\Exception\BarCodeException
            arguments:                          # optional
                message: "bar code exception"   # optional
                code:  0                        # optional
```

and pass the config key to the service:

```
$this->container->get('exceptionizer')->throwException('bar_code_exception');
```

Events and listener:
====================

[](#events-and-listener)

ExceptionizerBundle provide two events:

```
namespace Mabs\ExceptionizerBundle;

final class ExceptionizerEvents
{

    const EXCEPTIONIZER_PRE_THROW = 'exceptionizer.pre_throw';

    const EXCEPTIONIZER_POST_CATCH = 'exceptionizer.post_catch';
}
```

**exceptionizer.pre\_throw** : before throw Exception

**exceptionizer.post\_catch**: (will be documented later when we speak about the Exception Catcher)

Now you can create Listeners to do a specific job when an exception will be thrown ;) and to learn more about the EventDispatcher Component in symfony2 pleaze read [the documentation](http://symfony.com/doc/current/components/event_dispatcher/introduction.html)

License
-------

[](#license)

This bundle is available under the [MIT license](LICENSE).

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

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

---

Top Contributors

[![kernel64](https://avatars.githubusercontent.com/u/1070435?v=4)](https://github.com/kernel64 "kernel64 (35 commits)")

### Embed Badge

![Health badge](/badges/mabs-exceptionizer-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/mabs-exceptionizer-bundle/health.svg)](https://phpackages.com/packages/mabs-exceptionizer-bundle)
```

###  Alternatives

[square1/laravel-collection-rolling-average

Extend collections to support rolling average functionality.

2310.0k](/packages/square1-laravel-collection-rolling-average)

PHPackages © 2026

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