定制 dhii/exception 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dhii/exception

最新稳定版本:v0.1-alpha5

Composer 安装命令:

composer require dhii/exception

包简介

Standards-compliant exception classes

README 文档

README

Build Status Code Climate Test Coverage Latest Stable Version This package complies with Dhii standards

Standards-compliant exception classes.

Details

This package contains concrete implementations of classes that implement interfaces in dhii/exception-interface. This provides developers with ready-made, standards-compliant classes that can be safely instantiated and thrown to signal the various errors. The concrete exceptions will usually have a corresponding factory trait, and the factory methods of those traits are the recommended way of creating new exception instances (after service definition, of course).

Implementations in this package also have the following features aimed to become more standards-compliant:

  • A stringable is accepted everywhere, where a string can be passed.
  • All parameters can be passed null to signal default value (which may be not null).

Consumers, i.e. code that attempts to catch, should not depend on these classes. Instead, consumers should depend on the interfaces of dhii/exception-interface.

Creating New Exceptions

Sometimes, there is a need to create a new exception class, such as to implement a new standard (like dhii/action-interface), or perhaps to implement two unrelated interfaces (imagine an object that implements both Dhii\Action\ActionInterface and Mouf\Utils\Action\ActionInterface). In this case, implementing some of the features of Dhii exceptions may take an un-necessarily long time. This package provides a way to make creating new exceptions faster.

统计信息

  • 总下载量: 13.95k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 21
  • 推荐数: 3

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-07-30