jeremykendall / exception-interfaces
Exception interfaces inspired by Schindler, Barton, and Beck.
1.0.1
2014-02-07 19:31 UTC
Requires
- php: >=5.4
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is auto-updated.
Last update: 2024-11-25 06:59:49 UTC
README
Exception interfaces for PHP inspired by
- Ralph Schindler's Exception Best Practices in PHP 5.3 blog post
- John Barton's RFC for the 7XX Range of HTTP Status codes - Developer Errors project
- This tweet from Kent Beck
Usage
Simply create your own custom Exception, extend \Exception
, and implement one
of the exception interfaces. Done!
<?php namespace Example; use JeremyKendall\Exception\EdgeCases\ThatsJustSilly; class RidiculousException extends \Exception implements ThatsJustSilly {}
See Ralph Schindler's post, linked above, for background.
Installation
Install via Composer.