haeckel / exception
library that provides utilities and extensions for exceptions.
1.0.0
2025-09-27 20:56 UTC
Requires
- php: ^8.0
Requires (Dev)
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^12.3
- squizlabs/php_codesniffer: ^4.0
README
Haeckel/php-exception is a php library that provides utilities and extensions for exceptions.
Features
-
Utilities to make working with exceptions easier:
- MessageProvider: Provide common exception message templates to have consistent exception messages.
-
Extensions:
- LogCtxAware: Exceptions that contain an array, to capture the context when the exception is thrown. This context can then be passed to a psr/log compatible logger.
Installation
Install the package vai composer by running:
composer require haeckel/exception
Contribute
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Support
Let us know if you have issues.