PHPackages                             nimayneb/exceptionist - 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. nimayneb/exceptionist

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

nimayneb/exceptionist
=====================

Exceptionist - Throwing meaningful and semantic exceptions with interfaces

1.3.0(7y ago)010GPL-3.0PHPPHP &gt;=7.0

Since Sep 1Pushed 7y ago1 watchersCompare

[ Source](https://github.com/nimayneb/exceptionist)[ Packagist](https://packagist.org/packages/nimayneb/exceptionist)[ RSS](/packages/nimayneb-exceptionist/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)DependenciesVersions (9)Used By (0)

```
Exceptionist

```

Throwing meaningful and semantic exceptions with interfaces

Exception class names contain no word "Exception" in it. This is a redundant information and it is easier to understand and to read.

Usage:

```
use JBR\Exceptionist\InvalidArgument;
use JBR\Exceptionist\InvalidityReason:

function throwsAnException() {
    throw new InvalidArgument('An Argument is invalid');
}

try {
    throwsAnException();
} catch (InvalidityReason $e) {
    echo $e->getMessage();
}
```

```
use JBR\Exceptionist\EmptyArgument;
use JBR\Exceptionist\InvalidityReason:
use JBR\Exceptionist\DeficiencyReason;

function throwsAlsoAnException() {
    throw new EmptyArgument('An Argument is empty');
}

try {
    throwsAlsoAnException();
} catch (InvalidityReason|DeficiencyReason $e) {
    echo $e->getMessage();
}
```

Kind of exceptions:

- Empty
    - something is set, but have empty content
- Invalid
    - something is set, but has invalid characters or is in an invalid format
- Unknown
    - something is set, but it is unknown (not invalid)
- Missing
    - something is set, but its needs is missing
- Timeout
    - something is set, but it cannot be read in a particular time window

Kind of reasons:

- Absence
    - something is not reachable in a particular time window
- Compatibility
    - something is broken by compatibility
- Deficiency
    - something is needed, but is absent
- Invalidity
    - something is needed, but is invalid

Kind of scopes:

- Access
    - something with accessibilities
- Action
    - something with actions
- Argument
    - something with arguments of a method
    - something with arguments of an object
- Class
    - something with class instancing
- Configuration
    - something with configuration
- Declaration
    - something with declarations
- Definition
    - something with definitions
- Dependency
    - something with dependencies
- Interface
    - something with interfaces
- Method
    - something with methods of an object
- Object
    - something with objects
- Property
    - something with properties of an object
- Reference
    - something with references
- Requirement
    - something with requirements
- Return
    - something with returns of an object
    - something with returns of an method
- Trait
    - something with traits
- Type
    - something with types of a return
    - something with types of a method
    - something with types of an object
- Value
    - something with value

Compose exceptions for your application:
----------------------------------------

[](#compose-exceptions-for-your-application)

Create an interface or a trait for your application - so you are able to catch only the exceptions of your application.

```
interface YourApplication {
}

```

Create your exception:

```
use JBR\Exceptionist\InvalidParser;

class InvalidParserType extends InvalidParser implements YourApplication {

}

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity63

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

Recently: every ~145 days

Total

8

Last Release

2583d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0fbcb5c834ad511bbf12b303f38026f1c00466d4e2fe1e96f5bcfbae83779ac9?d=identicon)[nimayneb](/maintainers/nimayneb)

---

Tags

semantic-exceptions

### Embed Badge

![Health badge](/badges/nimayneb-exceptionist/health.svg)

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

###  Alternatives

[symfony/stopwatch

Provides a way to profile code

2.8k387.2M918](/packages/symfony-stopwatch)[fruitcake/laravel-debugbar

PHP Debugbar integration for Laravel

19.1k662.9k29](/packages/fruitcake-laravel-debugbar)[spatie/ignition

A beautiful error page for PHP applications.

510147.6M69](/packages/spatie-ignition)[jokkedk/webgrind

Webgrind is a Xdebug profiling web frontend in PHP5. It implements a subset of the features of kcachegrind and installs in seconds and works on all platforms. For quick'n'dirty optimizations it does the job.

3.3k193.0k](/packages/jokkedk-webgrind)[koriym/printo

An object graph visualizer.

1421.8M2](/packages/koriym-printo)[soloterm/dumps

A Laravel command to intercept dumps from your Laravel application.

125285.7k3](/packages/soloterm-dumps)

PHPackages © 2026

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