Download the PHP package kode/exception without Composer

On this page you can find all versions of the php package kode/exception. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package exception

kode/exception

kode 统一异常处理包,支持 FPM / 多进程 / 多线程 / 协程 / 分布式环境。

功能特性

v3.0.0 重大变更

安装

快速开始

统一入口(推荐)

使用 KodeException 统一入口进行一站式异常处理、日志记录和链路追踪:

统一响应格式

响应直接以 code 层开始,无需外层包装:

错误码体系

范围 类型 说明
E1xxx HTTP HTTP 协议相关错误(400-503)
E2xxx 业务 业务逻辑错误(参数、验证、不存在、冲突)
E3xxx 运行时 多进程/协程/连接池等运行时错误
E5xxx 系统 系统级错误(内存、磁盘等)

调用链路追踪

基本使用

导出链路报告

纯文本报告示例

HTTP 头

响应自动包含以下 HTTP 头:

环境支持

FPM

Swoole 协程

跨服务调用

协程 / Worker 运行时程序化响应

Swoole、Workerman、Fiber 等不走 PHP 原生 http 输出,需自行写入响应对象。 使用 ExceptionManager::respond() 即可获得 状态吗 + 响应体,且不会触发 echo

配置

异常位置信息

每个异常都包含精确定位信息:

类型判断方法

异常转换

项目规范

依赖

License

MIT


All versions of exception with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
psr/log Version ^3.0
monolog/monolog Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kode/exception contains the following files

Loading the files please wait ...