middlewares/json-exception-handler 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

middlewares/json-exception-handler

最新稳定版本:v1.0.0

Composer 安装命令:

composer require middlewares/json-exception-handler

包简介

Middleware to catch exceptions and output them as JSON

README 文档

README

Latest Version on Packagist Software License Testing Total Downloads

Catches exceptions that occur during request handling and output them as JSON.

Requirements

Installation

This package is installable and autoloadable via Composer as middlewares/json-exception-handler.

composer require middlewares/json-exception-handler

JsonExceptionHandler

Catches exceptions thrown that occur later in request processing an creates a new response with HTTP 500 status and JSON encoded version of the exception as the body.

contentType(string $type)

Change the Content-Type header of the response. Default is application/json.

includeTrace(bool $enable)

Enable or disable the stack trace in the response. Default is true.

jsonOptions(int $options)

Set options for json_encode of the exception. Default is 0.

Please see CHANGELOG for more information about recent changes and CONTRIBUTING for contributing details.

The MIT License (MIT). Please see LICENSE for more information.

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 7
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-04-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固