als / exception
解析器3异常渲染器。
1.0.1
2017-09-11 15:42 UTC
Requires (Dev)
- parser/composer: ^1.0
This package is auto-updated.
Last update: 2024-09-24 17:14:52 UTC
README
解析器“异常”模板化器,用于显示代码段和引起异常的代码行。
安装
$ composer require als/exception
基本用法
为了连接,需要在根目录的 auto.p 中覆盖 @unhandled_exception[]
方法。
############################################################################### @unhandled_exception[exception;stack] $result[^Als/Exception:render[ $.exception[$exception] $.stack[$stack] $.debug(true) $.lines(20) ]] # End: @unhandled_exception[]
参数
- $.exception
<hash>
错误信息 - $.stack
<table>
调用栈 - $.debug
<bool|method>
@is_developer[] 方法的链接,或其执行结果。(默认:false) - $.lines
<int>
对于调用栈中的每一行将显示的代码行数。(默认:20)
"发布"模式
"调试"模式
参考
- 错误和功能请求在 GitHub 上跟踪。