PHPackages                             markenwerk/common-exceptions - 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. markenwerk/common-exceptions

Abandoned → [chroma-x/common-exceptions](/?search=chroma-x%2Fcommon-exceptions)Library

markenwerk/common-exceptions
============================

A PHP library providing common exception classes used by different projects.

3.0.2(5y ago)218.3k—0%1MITPHPPHP &gt;=5.3

Since Apr 25Pushed 5y ago1 watchersCompare

[ Source](https://github.com/chroma-x/php-common-exceptions)[ Packagist](https://packagist.org/packages/markenwerk/common-exceptions)[ Docs](http://chroma-x.de/)[ RSS](/packages/markenwerk-common-exceptions/feed)WikiDiscussions master Synced today

READMEChangelog (10)DependenciesVersions (14)Used By (0)

PHP Common Exceptions
=====================

[](#php-common-exceptions)

[![SensioLabs Insight](https://camo.githubusercontent.com/1c2138e9d0042d1be6a5afa554b7ecb15d56f9953735a17c23610268f8312eb0/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f33366139613639352d333763352d343833362d626431352d3333613064303365653931352e737667)](https://insight.sensiolabs.com/projects/36a9a695-37c5-4836-bd15-33a0d03ee915)[![Code Climate](https://camo.githubusercontent.com/c5770f7cd3fde954191e6bd32ed82a98356747e3171ae3866d9695cde50b9a22/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6368726f6d612d782f7068702d636f6d6d6f6e2d657863657074696f6e732f6261646765732f6770612e737667)](https://codeclimate.com/github/chroma-x/php-common-exceptions)[![Latest Stable Version](https://camo.githubusercontent.com/33967799a38aeca9b96e532b8def547c9f18c491df464609e4e4b75e0692f756/68747470733a2f2f706f7365722e707567782e6f72672f6368726f6d612d782f636f6d6d6f6e2d657863657074696f6e732f762f737461626c65)](https://packagist.org/packages/chroma-x/common-exceptions)[![Total Downloads](https://camo.githubusercontent.com/4d478afbdc33a97dac075dc10754808b10504f6f65e9e56da3d11a4d95e02e07/68747470733a2f2f706f7365722e707567782e6f72672f6368726f6d612d782f636f6d6d6f6e2d657863657074696f6e732f646f776e6c6f616473)](https://packagist.org/packages/chroma-x/common-exceptions)[![License](https://camo.githubusercontent.com/ece1b2b4150f1a339d00987c3866899a1768b7e31418e435d8e822ce3a51ab75/68747470733a2f2f706f7365722e707567782e6f72672f6368726f6d612d782f636f6d6d6f6e2d657863657074696f6e732f6c6963656e7365)](https://packagist.org/packages/chroma-x/common-exceptions)

A PHP library providing common exception classes used by different projects.

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

[](#installation)

```
{
   	"require": {
        "chroma-x/common-exceptions": "~3.0"
    }
}

```

Usage
-----

[](#usage)

### Autoloading and namesapce

[](#autoloading-and-namesapce)

```
require_once('path/to/vendor/autoload.php');

```

---

### Handling exceptions

[](#handling-exceptions)

#### Catching by concrete class

[](#catching-by-concrete-class)

```
try{
	// Perform something maybe throwing an exception
} catch (ChromaX\CommonException\NetworkException\ConnectionException $exception) {
	// API is not reachable
} catch (ChromaX\CommonException\NetworkException\CurlException $exception) {
	// Curl failed
} catch (ChromaX\CommonException\ApiException\InvalidResponseException $exception) {
	// API returns an unexpected result
} catch (ChromaX\CommonException\ApiException\RequestQuotaException $exception) {
	// API requests over the allowed limit
} catch (ChromaX\CommonException\ApiException\NoResultsException $exception) {
	// API request had no result
} catch (ChromaX\CommonException\IoException\FileWriteException $exception) {
	// Log file was not writable
}

```

#### Catching by parent class

[](#catching-by-parent-class)

```
try{
	// Perform something maybe throwing an exception
} catch (ChromaX\CommonException\NetworkException\Base\NetworkException $exception) {
	// Any network exception was thrown
} catch (ChromaX\CommonException\ApiException\Base\ApiException $exception) {
	// Any API exception was thrown
} catch (ChromaX\CommonException\IoException\Base\IoException $exception) {
	// Any IO exception was thrown
}

```

#### Catching by grand parent class

[](#catching-by-grand-parent-class)

```
try{
	// Perform something maybe throwing an exception
} catch (ChromaX\CommonException\Base\BaseException $exception) {
	// Any exception was thrown
}

```

Contribution
------------

[](#contribution)

Contributing to our projects is always very appreciated.
**But: please follow the contribution guidelines written down in the [CONTRIBUTING.md](https://github.com/chroma-x/php-common-exceptions/blob/master/CONTRIBUTING.md) document.**

License
-------

[](#license)

PHP Common Exceptions is under the MIT license.

###  Health Score

34

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity65

Established project with proven stability

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

Recently: every ~431 days

Total

13

Last Release

1888d ago

Major Versions

1.2 → 2.02016-04-26

2.5.0 → 3.0.02016-07-06

### Community

Maintainers

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

---

Tags

commoncomposer-packageexceptionphp-libraryexceptions

### Embed Badge

![Health badge](/badges/markenwerk-common-exceptions/health.svg)

```
[![Health](https://phpackages.com/badges/markenwerk-common-exceptions/health.svg)](https://phpackages.com/packages/markenwerk-common-exceptions)
```

###  Alternatives

[bugsnag/bugsnag-laravel

Official Bugsnag notifier for Laravel applications.

90234.0M32](/packages/bugsnag-bugsnag-laravel)[bugsnag/bugsnag

Official Bugsnag notifier for PHP applications.

56446.1M69](/packages/bugsnag-bugsnag)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32131.8M2](/packages/bugsnag-bugsnag-psr-logger)[rollbar/rollbar

Monitors errors and exceptions and reports them to Rollbar

34523.3M73](/packages/rollbar-rollbar)[graham-campbell/exceptions

Provides A Powerful Error Response System For Both Development And Production

5861.2M3](/packages/graham-campbell-exceptions)[bugsnag/bugsnag-symfony

Official BugSnag notifier for Symfony applications.

452.9M3](/packages/bugsnag-bugsnag-symfony)

PHPackages © 2026

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