browserify / browserify/node-util
util.inspect() on Errors does not include stack trace
- 主要语言
- JavaScript
- 星标
- 255
- 派生
- 92
- PR 合并指标
- 30 天内没有已合并 PR
描述
`util.inspect(new Error('foo'))` in Node prints the stack trace of the error:
```
Error: foo
at repl:1:15
at Script.runInThisContext (vm.js:122:20)
at REPLServer.defaultEval (repl.js:334:29)
at bound (domain.js:395:14)
at REPLServer.runBound [as eval] (domain.js:408:12)
at REPLServer.onLine (repl.js:641:10)
at REPLServer.emit (events.js:187:15)
at REPLServer.EventEmitter.emit (domain.js:441:20)
at REPLServer.Interface._onLine (readline.js:301:10)
at REPLServer.Interface._line (readline.js:673:8)
```
This shim however just returns
```
[Error: foo]
```
Which is really bad if this is used as part of a logging tool.
贡献指南
这个仓库没有索引到贡献指南
调研方向
定位 util.inspect() 的实现及其对 Error 对象的处理,然后将 shim 的输出与 issue 中显示的 Node 输出进行比较。确认检查 Error 时会包含其堆栈跟踪,同时保留预期的消息格式。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, nodejs
- 领域
- tooling
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100