tc39 / tc39/eshost

Throwing a string does not report correctly

Open
#67 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.