jeremykendall/exception-interfaces

受Schindler、Barton和Beck启发的异常接口。

1.0.1 2014-02-07 19:31 UTC

This package is auto-updated.

Last update: 2024-08-25 06:31:53 UTC


README

受Ralph Schindler的PHP 5.3异常最佳实践博客文章启发的PHP异常接口

用法

只需创建自己的自定义异常,扩展\Exception并实现一个异常接口。完成!

<?php

namespace Example;

use JeremyKendall\Exception\EdgeCases\ThatsJustSilly;

class RidiculousException extends \Exception implements ThatsJustSilly {}

请参阅上文中链接的Ralph Schindler的文章,以获取背景信息。

安装

通过Composer安装。