Download the PHP package crazycodr/standard-exceptions without Composer
On this page you can find all versions of the php package crazycodr/standard-exceptions. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download crazycodr/standard-exceptions
More information about crazycodr/standard-exceptions
Files in crazycodr/standard-exceptions
Package standard-exceptions
Short Description This project is aimed at providing additional standard exceptions to php. Many exceptions that are missing from the SPL are constantly being reproduced in different projects. By providing a package of high-quality, well organised exceptions, it will, in the long run, increase interoperability between projects.
License MIT
Informations about the package standard-exceptions
Standard Exceptions Package
This project is aimed at providing additional standard exceptions to PHP.
Many exceptions that are missing from the SPL are constantly being reproduced in different projects. By providing a package of high-quality, well organised exceptions, it will, in the long run, increase interoperability between projects and libraries.
Getting started
To install Standard Exceptions
, just require it using Composer:
And then just start throwing exceptions:
Or catch them:
Or even better, catch exceptions with similar means:
For more information, visit the Documentation.
If you need help upgrading for the old version 1 to this version, see the Upgrading from Version 1 to Version 2 documentation page.
Features
- Highly comprehensive list of exceptions and namespaces: Browse
- Tag interfaces to catch common exceptions with similar means but different contexts
- Exceptions define default messages and error codes using the DefaultsInterface and DefaultConstructorTrait
- Throwing new exceptions from another exception allows easier exception chaining using FromException helper
Contribution
Don't hesitate to contribute to this package by:
- Proposing new exceptions or namespaces
- Fix documentation issues or bugs by opening PRs
- Using it and spreading it's use throughout projects and libraries
If you want to contribute to the code base go to the Contributing page.