AriaMinaei / AriaMinaei/pretty-error

Error message is stripped if stack exists

Open
#32 6 comments 1 reaction 0 assignees View on GitHub
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:
screen shot 2016-04-29 at 8 50 01 pm
(when no stack is present)

And this when there **is** a stack:
screen shot 2016-04-29 at 8 49 46 pm

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.