Now that I looked closer at this API, I see (if I'm not mistaken) two ways to
get the script name of where the exception was thrown:
- Through the script in the Message object, like exposed in this CL.
- Through the stack trace in the Message object. The top most function in the
stack trace can be used for Function::GetScriptOrigin, which gives you a
ScriptOrigin object, containing the script name or URL.

I wonder if we even need the first option. If not, we could even rip out the
script from the Message object altogether and just always use the second
option
to get to the script.

I agree that it would be great to remove redundant data from the Message object,
but I think there is a problem here.
As I mentioned in the e-mail thread previously we are working on adding better
syntax error handling here.
In case of SyntaxError the stack trace is either empty or has an eval() call on
its topmost frame.
The script where the original error happened and the position of the error in
this script is therefore not accessible from the stack trace which is why we
need to have it separately.

https://codereview.chromium.org/265593002/

--
--
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