PHPackages                             graham-campbell/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. [Framework](/categories/framework)
4. /
5. graham-campbell/exceptions

ActiveLibrary[Framework](/categories/framework)

graham-campbell/exceptions
==========================

Provides A Powerful Error Response System For Both Development And Production

v17.2.0(1y ago)5911.3M↑13%52[2 issues](https://github.com/GrahamCampbell/Laravel-Exceptions/issues)4MITPHPPHP ^7.4.15 || ^8.0.2CI passing

Since Feb 4Pushed 1y ago4 watchersCompare

[ Source](https://github.com/GrahamCampbell/Laravel-Exceptions)[ Packagist](https://packagist.org/packages/graham-campbell/exceptions)[ GitHub Sponsors](https://github.com/GrahamCampbell)[ Fund](https://tidelift.com/funding/github/packagist/graham-campbell/exceptions)[ RSS](/packages/graham-campbell-exceptions/feed)WikiDiscussions 17.2 Synced 1mo ago

READMEChangelog (10)Dependencies (12)Versions (76)Used By (4)

Laravel Exceptions
==================

[](#laravel-exceptions)

Laravel Exceptions was created by, and is maintained by [Graham Campbell](https://github.com/GrahamCampbell), and provides a powerful error response system for both development and production for [Laravel](https://laravel.com/). It optionally utilises the [Whoops](https://github.com/filp/whoops) package for the development error pages. Feel free to check out the [change log](CHANGELOG.md), [releases](https://github.com/GrahamCampbell/Laravel-Exceptions/releases), [security policy](https://github.com/GrahamCampbell/Laravel-Exceptions/security/policy), [license](LICENSE), [code of conduct](.github/CODE_OF_CONDUCT.md), and [contribution guidelines](.github/CONTRIBUTING.md).

[![Banner](https://user-images.githubusercontent.com/2829600/71477346-60993680-27e1-11ea-881f-01ac5caaa169.png)](https://user-images.githubusercontent.com/2829600/71477346-60993680-27e1-11ea-881f-01ac5caaa169.png)

[![Build Status](https://camo.githubusercontent.com/23f06fd4ae1a199279570958c39978106205f26c129e0acdb81f57c0161ec587/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f47726168616d43616d7062656c6c2f4c61726176656c2d457863657074696f6e732f74657374732e796d6c3f6c6162656c3d5465737473267374796c653d666c61742d737175617265)](https://github.com/GrahamCampbell/Laravel-Exceptions/actions?query=workflow%3ATests)[![StyleCI Status](https://camo.githubusercontent.com/0cc00692e8d97b97bc0d5388fe9ee7e7c27c25d6acba012f7a499419f157c653/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f32363838323138322f736869656c64)](https://github.styleci.io/repos/26882182)[![Software License](https://camo.githubusercontent.com/c090e080484e2a2bc766446291d04437db823929042bf614b26a1643660ddf6f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e3f7374796c653d666c61742d737175617265)](LICENSE)[![Packagist Downloads](https://camo.githubusercontent.com/cc202b58b50ddb548101bba8cd1822cac28a43e23a7210343a80d82f3f3689e8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f67726168616d2d63616d7062656c6c2f657863657074696f6e733f7374796c653d666c61742d737175617265)](https://packagist.org/packages/graham-campbell/exceptions)[![Latest Version](https://camo.githubusercontent.com/4dc6d6ce0eaacc57e2abe7fee7bec7825db97fe1f17e918df918bbaaf459d896/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f47726168616d43616d7062656c6c2f4c61726176656c2d457863657074696f6e733f7374796c653d666c61742d737175617265)](https://github.com/GrahamCampbell/Laravel-Exceptions/releases)

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

[](#installation)

This version requires [PHP](https://www.php.net/) 7.4-8.4 and supports [Laravel](https://laravel.com/) 8-11.

ExceptionsL5.5L5.6L5.7L5.8L6L7L8L9L10L1111.3✅✅✅✅❌❌❌❌❌❌12.1✅✅✅✅✅❌❌❌❌❌13.1❌❌❌❌✅❌❌❌❌❌14.1❌❌❌❌❌✅✅❌❌❌15.2❌❌❌❌❌✅✅✅❌❌16.0❌❌❌❌❌❌✅✅❌❌17.2❌❌❌❌❌❌✅✅✅✅To get the latest version, simply require the project using [Composer](https://getcomposer.org):

```
$ composer require "graham-campbell/exceptions:^17.2"
```

Once installed, if you are not using automatic package discovery, then you need to register the `GrahamCampbell\Exceptions\ExceptionsServiceProvider` service provider in your `config/app.php`.

You then MUST change your `App\Exceptions\Handler` to extend `GrahamCampbell\Exceptions\ExceptionHandler`.

Whoops Support
--------------

[](#whoops-support)

If you want to have the debug error pages available, you're going to need to require [Whoops](https://github.com/filp/whoops):

```
$ composer require "filp/whoops:^2.15" --dev
```

Our debug displayer will automatically detect the presence of Whoops. Feel free to go and have a read of our source code to give you a better understanding of how this works.

Configuration
-------------

[](#configuration)

Laravel Exceptions supports optional configuration.

To get started, you'll need to publish all vendor assets:

```
$ php artisan vendor:publish
```

This will create a `config/exceptions.php` file in your app that you can modify to set your configuration. Also, make sure you check for changes to the original config file in this package between releases.

There are a few config options:

##### Exception Transformers

[](#exception-transformers)

This option (`'transformers'`) defines each of the exception transformers setup for your application. This allows you to turn your exceptions into other exceptions such as exceptions for perfect results when passed to the displayers. Note that this list is processed in order and subsequent transformers can still modify the results of previous ones if required.

##### Exception Displayers

[](#exception-displayers)

This option (`'displayers'`) defines each of the exception displayers setup for your application. These displayers are sorted by priority. Note that when we are in debug mode, we will select the first valid displayer from the list, and when we are not in debug mode, we'll filter out all verbose displayers, then select the first valid displayer from the new list.

##### Displayer Filters

[](#displayer-filters)

This option (`'filters'`) defines each of the filters for the displayers. This allows you to apply filters to your displayers in order to work out which displayer to use for each exception. This includes things like content type negotiation.

##### Default Displayer

[](#default-displayer)

This option (`'default'`) defines the default displayer for your application. This displayer will be used if your filters have filtered out all the displayers, otherwise leaving us unable to displayer the exception.

##### Exception Levels

[](#exception-levels)

This option (`'levels'`) defines the log levels for the each exception. If an exception passes an instance of test for each key, then the log level used is the value associated with each key.

Usage
-----

[](#usage)

There is currently no usage documentation for Laravel Exceptions, but we are open to pull requests.

Security
--------

[](#security)

If you discover a security vulnerability within this package, please send an email to . All security vulnerabilities will be promptly addressed. You may view our full security policy [here](https://github.com/GrahamCampbell/Laravel-Exceptions/security/policy).

License
-------

[](#license)

Laravel Exceptions is licensed under [The MIT License (MIT)](LICENSE).

For Enterprise
--------------

[](#for-enterprise)

Available as part of the Tidelift Subscription

The maintainers of `graham-campbell/exceptions` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-graham-campbell-exceptions?utm_source=packagist-graham-campbell-exceptions&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance44

Moderate activity, may be stable

Popularity60

Solid adoption and visibility

Community29

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 97.2% 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 ~49 days

Recently: every ~181 days

Total

76

Last Release

442d ago

Major Versions

v13.1.1 → v14.1.12021-01-25

13.1.x-dev → 14.1.x-dev2021-04-04

14.1.x-dev → 15.0.x-dev2021-04-04

15.2.x-dev → v16.0.02022-05-30

16.0.x-dev → 17.0.x-dev2023-03-07

PHP version history (7 changes)v1.0.0PHP &gt;=5.5.0

v2.0.0PHP &gt;=5.5.9

v10.0.0PHP ^7.0

v11.0.0PHP ^7.1.3

v13.0.0PHP ^7.2.5

v13.1.0PHP ^7.2.5 || ^8.0

v16.0.0PHP ^7.4.15 || ^8.0.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/d95eb26cb8f3919bb5ca3b6d823daeabbf259663778a970349b245c580713c8e?d=identicon)[graham-campbell](/maintainers/graham-campbell)

---

Top Contributors

[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (518 commits)")[![vinkla](https://avatars.githubusercontent.com/u/499192?v=4)](https://github.com/vinkla "vinkla (6 commits)")[![joecohens](https://avatars.githubusercontent.com/u/1803556?v=4)](https://github.com/joecohens "joecohens (1 commits)")[![LavaToaster](https://avatars.githubusercontent.com/u/838613?v=4)](https://github.com/LavaToaster "LavaToaster (1 commits)")[![4n70w4](https://avatars.githubusercontent.com/u/38257723?v=4)](https://github.com/4n70w4 "4n70w4 (1 commits)")[![m1guelpf](https://avatars.githubusercontent.com/u/23558090?v=4)](https://github.com/m1guelpf "m1guelpf (1 commits)")[![rcngo](https://avatars.githubusercontent.com/u/17250811?v=4)](https://github.com/rcngo "rcngo (1 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (1 commits)")[![thomasHolman](https://avatars.githubusercontent.com/u/1763581?v=4)](https://github.com/thomasHolman "thomasHolman (1 commits)")[![libern](https://avatars.githubusercontent.com/u/1830640?v=4)](https://github.com/libern "libern (1 commits)")[![harreh](https://avatars.githubusercontent.com/u/158036502?v=4)](https://github.com/harreh "harreh (1 commits)")

---

Tags

hacktoberfestframeworklaravelexceptionerrorwhoopserrorsexceptionsGraham CampbellGrahamCampbellLaravel Exceptions

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/graham-campbell-exceptions/health.svg)

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k84.2M225](/packages/laravel-horizon)[graham-campbell/markdown

Markdown Is A CommonMark Wrapper For Laravel

1.3k7.1M64](/packages/graham-campbell-markdown)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[graham-campbell/manager

Manager Provides Some Manager Functionality For Laravel

39221.1M134](/packages/graham-campbell-manager)[graham-campbell/github

GitHub Is A GitHub Bridge For Laravel

6411.7M19](/packages/graham-campbell-github)

PHPackages © 2026

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