Throwing a string does not report correctly
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 147
- Forks
- 45
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 4
Description
A file of:
throw new Error('foo');
provides these results:
#### ch
Error: foo
#### v8
Error: foo
#### sm
Error: foo
#### jsc
Error: foo
A file of:
throw 'foo';
provides these results:
#### ch
foo: undefined
#### sm
#### v8
foo: undefined
#### jsc
foo: undefined
This is both unclear that it threw, but also, spidermonkey is reporting the wrong result.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the two JavaScript examples through eshost across ch, v8, sm, and jsc, then trace the result-reporting path for thrown primitive values. Done means the output clearly indicates that a string was thrown and SpiderMonkey reports the same correct result as the other hosts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100