Support the ongoing development of Laravel.io →
IOC Packages Architecture

Custom exception handlers let you define the behavior of your application when a specific exception is thrown.

By default you can add your custom handlers in app/Exceptions/Handler.php, but the more handlers you add the more this class gets cluttered and difficult to read.

Furthermore it is not possible for an external Laravel package to automatically register how its custom exceptions should be handled by the application where it is being installed.

This is where this package comes in handy, it lets you register your custom exception handlers by using service providers, so that also external packages may register their own.

This package leverages the decorators design pattern, which let you keep using the Laravel default handler as you normally would. It just wraps the Handler class to extend its functionalities.

For further information, please have a look at the package on GitHub. Any feedback is welcome, thank you :)

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.