W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2013

Re: Catching exceptions

From: Rick Waldron <waldron.rick@gmail.com>
Date: Tue, 2 Apr 2013 10:16:09 -0400
Message-ID: <CAHfnhfqpqq=jLk_SNPvRcvKWbeydnzHGKZgR1YPifqjkp==5dQ@mail.gmail.com>
To: Anne van Kesteren <annevk@annevk.nl>
Cc: "public-script-coord@w3.org" <public-script-coord@w3.org>
Using PutValue and [[Put]] as an example (http://es5.github.com/#x8.7.2)...

PutValue makes calls to [[Put]], with arguments: property, descriptor and
throw. In 3.b, the Throw flag is explicitly set to false, in 4.b the Throw
flag is set to boolean value returned by isStrictReference(v) (where v is
the lhs of an assignment). In [[Put]], the value of the Throw flag is used
on 2.a, 4.a, and 7.a in conjunction with the results of other operations,
to determine whether or not a TypeError exception will be thrown.

I believe the same or a similar specification mechanism can be used.


On Tue, Apr 2, 2013 at 5:38 AM, Anne van Kesteren <annevk@annevk.nl> wrote:

> So reading the ECMAScript specification I cannot find this concept
> used there. A number of scenarios require us to catch exceptions and
> either handle them or maybe re-throw them as appropriate. Is this
> language fine:
> 1. Invoke /callback/ ...
> 2. If that threw an exception, ...
> Or are there some other things I need to take into account? Is there
> preferred language for this kind of pattern?
> --
> http://annevankesteren.nl/
Received on Tuesday, 2 April 2013 14:17:05 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:12 UTC