ES4 draft: Error classes
lhansen at adobe.com
Fri Mar 21 08:12:37 PDT 2008
> -----Original Message-----
> From: Brendan Eich [mailto:brendan at mozilla.org]
> Sent: 20. mars 2008 15:31
> To: Lars Hansen
> Cc: Mike Shaver; es4-discuss Discuss; P T Withington
> Subject: Re: ES4 draft: Error classes
> On Mar 20, 2008, at 12:02 PM, Lars Hansen wrote:
> >> //@line 123 "awesomeLib.js"
> >> throw Error("ow");
> >> The error's line number is 123, file is "awesomeLib.js". We have
> >> some bits in there like a limit on the filename length
> >> (1024) and a cap on the line length (10x our "natural" line length,
> >> think); eminently negotiable.
> > OK. We would need to accomodate other input sources than files at a
> > minimum, maybe an optional string at the end (the file name could be
> > optional too).
> The filename is optional, defaults to "".
> You could (absent security concerns) subsume filename under
> URL or URI. "-" is an old Unix convention meaning stdin. What
> other input sources did you have in mind?
Considering multiple execution environments, the list looks at least
* inline scripts
* event handlers
* linked scripts (URLs I guess)
* "eval" text
* "new Function" text
* stdin and similar streams
I don't know how much detail is useful nor how much can really be
without becoming insecure; clearly depends on the environment.
> >> I'm not sure we turned it on for content, because of spoofing
> >> concerns, but I'm pretty sure we use it for our chrome.
> > If you could dig up a discussion thread or actual person to
> > that concern, it would probably be helpful.
> /me raises hand
> See https://bugzilla.mozilla.org/show_bug.cgi?id=243359 for
> the history, which includes the inevitable "sometimes I want
> the revised source coords, sometimes you want the originals" perplex.
Yeah, that one was bound to come up.
Thanks for the reference, will read it and ponder the options.
More information about the Es4-discuss