Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/neighborhoods/exceptioncomponent
Provides a consistent transient and non-transient exception types.
https://github.com/neighborhoods/exceptioncomponent
Last synced: about 1 month ago
JSON representation
Provides a consistent transient and non-transient exception types.
- Host: GitHub
- URL: https://github.com/neighborhoods/exceptioncomponent
- Owner: neighborhoods
- License: mit
- Created: 2020-07-29T19:48:53.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-19T15:02:37.000Z (over 3 years ago)
- Last Synced: 2024-11-10T23:20:17.710Z (about 2 months ago)
- Language: PHP
- Size: 14.6 KB
- Stars: 0
- Watchers: 19
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Neighborhoods Exception Component
Provides a consistent transient and non-transient exception types.These are primarily intended to be used in Repositories. Repositories are experts at interacting with their associated storages. They should catch storage exceptions, interpret them (since a lot of storage exceptions have esoteric codes or, worse, esoteric message strings that need to be identified for certain cases) and decompose the specific storage exception to be either Transient (this will get better) or NonTransient (this needs a human, i.e. it will not get better.)
## Example
```php
//...
} catch (\Doctrine\DBAL\ConnectionException $connectionException) {
throw (new TransientException())->setPrevious($pdoException);
}
return $this;
```