crazycodr/standard-exceptions
Composer 安装命令:
composer require 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
README 文档
README
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
- 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.
crazycodr/standard-exceptions 适用场景与选型建议
crazycodr/standard-exceptions 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 231.99k 次下载、GitHub Stars 达 146, 最近一次更新时间为 2013 年 11 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 crazycodr/standard-exceptions 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 crazycodr/standard-exceptions 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 231.99k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 147
- 点击次数: 36
- 依赖项目数: 7
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-11-07