PHPackages                             dhii/exception-interface - 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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. dhii/exception-interface

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

dhii/exception-interface
========================

Interfaces for most common exceptions

v0.2(7y ago)141.3k↑6135.7%2[1 PRs](https://github.com/Dhii/exception-interface/pulls)14MITPHPPHP ^5.3 | ^7.0

Since Sep 1Pushed 6y ago3 watchersCompare

[ Source](https://github.com/Dhii/exception-interface)[ Packagist](https://packagist.org/packages/dhii/exception-interface)[ RSS](/packages/dhii-exception-interface/feed)WikiDiscussions develop Synced yesterday

READMEChangelog (5)Dependencies (5)Versions (8)Used By (14)

Dhii - Exception - Interface
============================

[](#dhii---exception---interface)

[![Build Status](https://camo.githubusercontent.com/657c5e0b5373294efe0e8c0df1fcb7acc34de92bae51c2a1b4b6f7df1b474cd1/68747470733a2f2f7472617669732d63692e6f72672f446869692f657863657074696f6e2d696e746572666163652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Dhii/exception-interface)[![Code Climate](https://camo.githubusercontent.com/94be90bc9ed968cf76a94c3a704367455ab059c47d4f09fc75233a6558a6f087/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f446869692f657863657074696f6e2d696e746572666163652f6261646765732f6770612e737667)](https://codeclimate.com/github/Dhii/exception-interface)[![Test Coverage](https://camo.githubusercontent.com/78c3d7c10107ba7145d858fa65577171c292285fc00146e944c4806a844225f4/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f446869692f657863657074696f6e2d696e746572666163652f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/Dhii/exception-interface/coverage)[![Latest Stable Version](https://camo.githubusercontent.com/ce86dd9734f8a21f874907d357cbfb6fabd632b22b38108d74fdde2a49f7516a/68747470733a2f2f706f7365722e707567782e6f72672f646869692f657863657074696f6e2d696e746572666163652f76657273696f6e)](https://packagist.org/packages/dhii/exception-interface)[![This package complies with Dhii standards](https://camo.githubusercontent.com/44bbe8c7678c1784cfc53cabce5d3e32fc22a840453c5ed9c08601522fe7c213/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446869692d436f6d706c69616e742d677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/Dhii/dhii)

Interfaces for most common exceptions.

Details
-------

[](#details)

- [`ThrowableInterface`](src/ThrowableInterface.php) - The base of all exception interfaces. Declares all the same methods as `Exception` in a compatible way, and additionally extends [`StringableInterface`](https://github.com/Dhii/stringable-interface/blob/master/src/StringableInterface.php).
- [`BadSubjectExceptionInterface`](src/BadSubjectExceptionInterface.php) - Base interface for all exceptions that are related to some value being invalid, malformed, out of range, etc. Exposes that value via `getSubject()`.
- [`InvalidArgumentExceptionInterface`](src/InvalidArgumentExceptionInterface.php) - Allows de-coupling from the vanilla [`InvalidArgumentException`](http://php.net/manual/en/class.invalidargumentexception.php), and makes it more useful besides signalling the problem type by exposing the argument via `BadSubjectExceptionInterface#getSubejct()`.
- [`ArgumentCodeAwareInterface`](src/ArgumentCodeAwareInterface.php) - Useful with `InvalidArgumentExceptionInterface`for providing information about the source of the problematic argument.
- [`OutOfBoundsExceptionInterface`](src/OutOfBoundsExceptionInterface.php) - Complementing the native [`OutOfBoundsException`](http://php.net/manual/en/class.outofboundsexception.php), it occurs when a key is addressed in a set that does not have it, like accessing a non-existing array key. Exposes the bad key.
- [`OutOfRangeExceptionInterface`](src/OutOfRangeExceptionInterface.php) - Complementing the native [`OutOfRangeException`](http://php.net/manual/en/class.outofrangeexception.php), it occurs when a value is valid but illegal, i.e. is outside of the allowed range, like when an integer that represents a colour and must be 0-255 has the value of 256. Exposes the bad value.
- [`RuntimeExceptionInterface`](src/RuntimeExceptionInterface.php) - A generic runtime problem.
- [`InternalExceptionInterface`](src/InternalExceptionInterface.php) - A problem that occurs in relation to the inner workings of the unit, and is not caused by the consumer. Guarantees to expose an inner exception.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity53

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

Every ~90 days

Total

5

Last Release

2865d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1894e91b32c9f80d8f30a42d360af6983a507f1cf2c621b7c9a0a0de14e011c5?d=identicon)[XedinUnknown](/maintainers/XedinUnknown)

---

Top Contributors

[![XedinUnknown](https://avatars.githubusercontent.com/u/1428973?v=4)](https://github.com/XedinUnknown "XedinUnknown (66 commits)")

---

Tags

error-handlingstandard

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[fjogeleit/prometheus-messenger-middleware

Prometheus Middleware for the Symfony Messenger Component

2255.2k](/packages/fjogeleit-prometheus-messenger-middleware)[spatie/craft-ray

Easily debug CraftCMS projects

1638.6k](/packages/spatie-craft-ray)

PHPackages © 2026

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