ES4 draft: Error classes

Brendan Eich brendan at mozilla.org
Thu Mar 20 15:30:48 PDT 2008


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, I 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?

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

/be



More information about the Es4-discuss mailing list