API to get stack frame info from generator

Bruno Jouhier bjouhier at gmail.com
Fri Jun 14 07:56:29 PDT 2013


I'm using ES6 generators to implement a little async/await library and I'm
quite pleased with the result so far but I'm lacking one API: a function to
get stack information from a generator object. Ideally it would return the
name of the current generator function, the filename and the line number
where it last yielded.

If I had this API I 'd be able to provide a complete trace of the stack of
await calls when an exception is caught.

I raised the subject in the v8-users mailing list and Andy Wingo replied
that this could be an interesting addition to the Reflect module and that I
should post here.

I've got another less important suggestion regarding syntax but I'll post
separately.

Bruno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130614/41b0710f/attachment.html>


More information about the es-discuss mailing list