innmind/stack-trace 问题修复 & 功能扩展

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

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

innmind/stack-trace

最新稳定版本:4.2.0

Composer 安装命令:

composer require innmind/stack-trace

包简介

Tool to inspect exception stack trace

README 文档

README

Build Status codecov Type Coverage

Tool to inspect an Exception stack trace

Installation

composer require innmind/stack-trace

Usage

use Innmind\StackTrace\{
    StackTrace,
    Render,
};
use Innmind\OperatingSystem\Factory;
use Innmind\Server\Control\Server\Command;

$trace = StackTrace::of(new AnyClassImplementingPhpThrowableInterface);

// every call frames that lead to the exception to be thrown
// (deepest call frame first)
$callFrames = $trace->throwable()->callFrames();

// this will render the stack trace via graphviz
Factory::build()
    ->control()
    ->processes()
    ->execute(
        Command::foreground('dot')
            ->withShortOption('Tsvg')
            ->withShortOption('o', 'graph.svg')
            ->withInput(
                Render::of()($trace)
            ),
    )
    ->unwrap()
    ->wait();

Note

The svg rendered contains links to the files where call frames and exceptions occured, you can change the link by providing an instance of Link to the Render object.

Example of a rendered stack trace:

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-10-20