AriaMinaei / AriaMinaei/pretty-error
Error message is stripped if stack exists
- Dominant language
- CoffeeScript
- Stars
- 1.5k
- Forks
- 51
- PR merge metrics
- No merged PRs in 30d
Description
It seems as though the error's message is stripped if a stack trace is present ([ParsedError.coffee:25](https://github.com/AriaMinaei/pretty-error/blob/master/src/ParsedError.coffee#L25)):
```
if typeof @_stack is 'string'
@_parseStack()
else
@_message = @error.message? and String(@error.message) or ''
```
Resulting in something like:
(when no stack is present)
And this when there **is** a stack:
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in src/ParsedError.coffee at line 25 and read how the message is assigned when a stack trace is present versus absent. Reproduce the two reported cases, then confirm that errors with stacks retain their messages while the existing no-stack behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- coffeescript, node.js
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100