Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong exception reported for throw with toString returning symbol #4912

Closed
programmerjake opened this issue Jan 27, 2016 · 2 comments
Closed
Labels
v8 engine Issues and PRs related to the V8 dependency.

Comments

@programmerjake
Copy link

displaying wrong exception for throwing an object with toString returning a symbol:

> throw {toString:function(){return Symbol.iterator}}
TypeError: Cannot convert a Symbol value to a string
    at Domain.<anonymous> (repl.js:277:43)
    at emitOne (events.js:77:13)
    at Domain.emit (events.js:169:7)
    at REPLServer.defaultEval (repl.js:256:26)
    at bound (domain.js:280:14)
    at REPLServer.runBound [as eval] (domain.js:293:12)
    at REPLServer.<anonymous> (repl.js:412:12)
    at emitOne (events.js:82:20)
    at REPLServer.emit (events.js:169:7)
    at REPLServer.Interface._onLine (readline.js:210:10)
@bnoordhuis
Copy link
Member

That error message originates in V8 (objects.cc to be exact) and is not under our control. That said, I don't see what's wrong with it. ES6 symbols don't coerce to strings.

@mscdex mscdex added the v8 engine Issues and PRs related to the V8 dependency. label Jan 27, 2016
@cjihrig
Copy link
Contributor

cjihrig commented Jan 27, 2016

Agreed. This seems like a non-issue.

@cjihrig cjihrig closed this as completed Jan 27, 2016
This was referenced Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

No branches or pull requests

4 participants