neighborhoods/exception-component
Composer 安装命令:
composer require neighborhoods/exception-component
包简介
Provides consistent transient and non-transient exception types.
README 文档
README
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
//... } catch (\Doctrine\DBAL\ConnectionException $connectionException) { throw (new TransientException())->setPrevious($pdoException); } return $this;
统计信息
- 总下载量: 6.73k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-07-29