定制 rudra/exception 二次开发

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

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

rudra/exception

Composer 安装命令:

composer require rudra/exception

包简介

Rudra framework

README 文档

README

PHPunit Maintainability CodeFactor Coverage Status

Rudra-Exception | API

Install

composer require rudra/exception

Usage

Throwing HTTP Errors
// Using abort() helper
abort(404);
abort(500, "Internal Server Error");

// Or directly
throw new RouterException("Not Found", 404);
throw new NotFoundException("Resource not found");
throw new LogicException("Invalid configuration");

Exception Hierarchy

Throwable
└── RuntimeException
    └── RudraException
        ├── RouterException
        ├── LogicException
        │   └── MiddlewareException
        ├── NotFoundException
        └── RuntimeException

Configuration

Error Pages

Configure error handlers in your setting.{$env}.yml:

http.errors:
    404:
        controller: App\Ship\Errors\Controller\HttpErrorsController 
        action: error404
    503:
        controller: App\Ship\Errors\Controller\HttpErrorsController
        action: error503

DebugBar Integration

In development mode, exceptions are automatically logged to DebugBar:

if (Rudra::config()->get("environment") === "development") {
    $debugbar->addCollector(new DebugBar\DataCollector\ExceptionsCollector());
}

License

This project is licensed under the Mozilla Public License 2.0 (MPL-2.0) — a free, open-source license that:

  • Requires preservation of copyright and license notices,
  • Allows commercial and non-commercial use,
  • Requires that any modifications to the original files remain open under MPL-2.0,
  • Permits combining with proprietary code in larger works.

📄 Full license text: LICENSE
🌐 Official MPL-2.0 page: https://mozilla.org/MPL/2.0/

统计信息

  • 总下载量: 1.61k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 18
  • 依赖项目数: 8
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MPL-2.0
  • 更新时间: 2017-02-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固