crazycodr/standard-exceptions

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 betwee

2.4.3 2020-01-22 20:42 UTC

This package is auto-updated.

Last update: 2024-11-09 15:17:17 UTC


README

Latest Stable Version Monthly Downloads Build Status

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:

$ composer require crazycodr/standard-exceptions

And then just start throwing exceptions:

throw new \Exceptions\Data\NotFoundException();

Or catch them:

try {

} catch(\Exceptions\Data\NotFoundExceptions $ex){

}

Or even better, catch exceptions with similar means:

try {

} catch(\Exceptions\Tag\NotFoundTag $ex){
   
}

For more information, visit the Getting Started Page or for even more information, you get read the whole 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

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.