innmind/stack-trace
最新稳定版本:4.2.0
Composer 安装命令:
composer require innmind/stack-trace
包简介
Tool to inspect exception stack trace
README 文档
README
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.
统计信息
- 总下载量: 43.73k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-10-20