ES4 draft: assert expression

Lars Hansen lhansen at adobe.com
Fri Apr 11 12:48:46 PDT 2008


Ah!  Of course.

The natural thing to spec would be that the text of the expression
would be part of (all of?) the "message" of the exception object
in the 1-arg case.

--lars

> -----Original Message-----
> From: P T Withington [mailto:ptwithy at gmail.com] On Behalf Of 
> P T Withington
> Sent: 11. april 2008 13:46
> To: Lars Hansen
> Cc: es4-discuss at mozilla.org
> Subject: Re: ES4 draft: assert expression
> 
> Is there any way the value thrown in the 1-arg case could be 
> the 'text' of arg1?  It's so painful to get an assertion and 
> not know what it is...
> 
> On 2008-04-11, at 13:16 EDT, Lars Hansen wrote:
> > We talked about debugging information and an assertion form on 
> > es4-discuss a while ago, in a thread about the Error object.  As a 
> > result of that discussion, I'm sending out a draft for an "assert"
> > expression form.  In addition, the Error object draft will 
> be updated 
> > to accomodate a new subclass AssertionExpression, and a simple 
> > standard for debugging information will be added to the 
> description of 
> > the Error classes.
> >
> > The last detail from that discussion, about providing a way for 
> > programs to set the source origin and line numbers -- aiding 
> > translators -- is still open, but I am aware of how 
> desirable this is 
> > for certain applications.
> >
> > Anyhow, here's the first draft spec for the assert expression.
> >
> > --lars
> >
> > <assert.html>_______________________________________________
> > Es4-discuss mailing list
> > Es4-discuss at mozilla.org
> > https://mail.mozilla.org/listinfo/es4-discuss
> 
> 



More information about the Es4-discuss mailing list