Status: Untriaged
Owner: ----
CC: [email protected]
Labels: Type-Bug Priority-Medium

New issue 4364 by [email protected]: Some of the SyntaxError message missing when exception rethrown (d8 bug)
https://code.google.com/p/v8/issues/detail?id=4364

Version: V8 version 4.3.61
OS: Mac
Architecture: x86_64

What steps will reproduce the problem?
1. Create a file foo.js with content as follows:
try {
  eval('for i in range(10):');
} catch (err) {
  throw err;
}
2. d8 foo.js


*What is the expected output?

undefined:1: SyntaxError: Unexpected identifier
for i in range(10):
    ^
SyntaxError: Unexpected identifier
    at test.js:2:1

*What do you see instead?

test.js:4: SyntaxError: Unexpected identifier
  throw err;
        ^
SyntaxError: Unexpected identifier
    at test.js:2:3


If I just do eval('for i in range(10):'), I get the expected exception message that shows where the syntax error is. Why does try & catch + rethrow the error throws away that useful message?

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to