PHPackages                             pnoexz/php-api-exception - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. pnoexz/php-api-exception

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

pnoexz/php-api-exception
========================

PHP Exceptions

v1.0.0(7y ago)0436MITPHPCI failing

Since Nov 11Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Pnoexz/php-api-exception)[ Packagist](https://packagist.org/packages/pnoexz/php-api-exception)[ RSS](/packages/pnoexz-php-api-exception/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (3)Versions (4)Used By (0)

PHP API Exception
=================

[](#php-api-exception)

PHP API Exception relies on the following principles:

- Each exception must be unique.
- Consumers MUST NOT rely on the human readable error message to identify it.
- Comply with PSR-3. See:

Signature
---------

[](#signature)

```
/**
 * @param array           $data     Any JSON serializable data we should
 *                                  send to the user along with the built-in
 *                                  information
 * @param \Throwable|null $previous The previous exception thrown to
 *                                  maintain the exception chain
 */
ApiExceptionL::__construct(array $data = [], \Throwable $previous = null)
```

Examples
--------

[](#examples)

### Simple usage

[](#simple-usage)

```
