Updates:
        Status: WorkingAsIntended

Comment #2 on issue 2549 by [email protected]: Re-throwing any type of error should keep the original line number, filename and stack trace intact.
http://code.google.com/p/v8/issues/detail?id=2549

Yes. This is working as intended. Only the Error() constructor captures the stack trace (unless you use the stack trace API, as already noted). For all other objects or primitives thrown, the stack trace is captured at (re-)throw site. The reason is that for example in

try {
  (function() { throw 2; })();
} catch (e) {
  if (e == 2) throw 2;
}

there is no way to correctly decide whether the eventually thrown number 2 is being rethrown or not. There is also no elegant way to attach a stack trace to a primitive value.

--
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/groups/opt_out.


Reply via email to