domenic at domenicdenicola.com (2014-03-30T16:12:37.732Z)
Is the FFEvalLineColPatterns at https://code.google.com/p/google-caja/source/browse/trunk/src/com/google/caja/ses/debug.js#194 correct?
Is the FFEvalLineColPatterns at https://code.google.com/p/google-caja/source/browse/trunk/src/com/google/caja/ses/debug.js#194 correct?
Is the FFEvalLineColPatterns at < https://code.google.com/p/google-caja/source/browse/trunk/src/com/google/caja/ses/debug.js#194> correct? On Thu, Mar 27, 2014 at 11:29 AM, Jason Orendorff <jason.orendorff at gmail.com > wrote: > Not formally, but it's straightforward: > > At the time you call eval() or Function(), we capture the string > fileName + " line " + lineNumber + " > eval" > or "> Function" if you're calling Function. We use that string as the > fileName for the dynamic eval or Function code. This affects both > err.fileName and err.stack. > > This implies these synthetic fileNames can nest. You can end up with a > stack like: > > js> try { eval("eval('FAIL')"); } catch (x) { print(x.stack); } > @typein line 2 > eval line 1 > eval:1:1 > @typein line 2 > eval:1:1 > @typein:2:7 > > I think the extended format was added in this bug: > https://bugzilla.mozilla.org/show_bug.cgi?id=332176 > > -j > > On Thu, Mar 27, 2014 at 1:37 PM, Mark S. Miller <erights at google.com> > wrote: > > Is this extended format documented anywhere? > > > > > > On Thu, Mar 27, 2014 at 10:36 AM, Jason Orendorff > > <jason.orendorff at gmail.com> wrote: > >> > >> On Thu, Mar 27, 2014 at 12:31 PM, Mark Miller <erights at gmail.com> > wrote: > >> > Mozillians, why did you add this extra information? > >> > >> Well... if the point of Error.stack is to provide diagnostic > >> information for exceptions, for the purpose of debugging, this > >> information is critical. > >> > >> Without this, eval() or Function() often won't appear on the stack > >> anywhere. What we were doing before didn't reveal that eval or > >> Function was involved at all. It was misleading and unhelpful. > >> > >> -j > > > > > > > > > > -- > > Cheers, > > --MarkM > -- Text by me above is hereby placed in the public domain Cheers, --MarkM -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140327/f7cea757/attachment.html>