W3C home > Mailing lists > Public > public-webcrypto@w3.org > July 2014

[Bug 26301] Normalization: Should through instead of returning an Error instance

From: <bugzilla@jessica.w3.org>
Date: Wed, 09 Jul 2014 19:57:26 +0000
To: public-webcrypto@w3.org
Message-ID: <bug-26301-7213-2uxRjKjEj1@http.www.w3.org/Bugs/Public/>

--- Comment #1 from Ryan Sleevi <sleevi@google.com> ---
Well, mostly because we never defined in the spec terminology how to handle
thrown exceptions from sub-algorithms, hence the ad-hoc handling.

Even within the space of "Web" specifications, there are all sorts of different
conventions, hence my attempt to just find one and try to stick to it.

- DOM - Doesn't provide a generic means of sub-algorithm throwing, e.g.
- ES6 - Uses ReturnIfAbrupt (and friends) to avoid throwing directly in
sub-algorithms, though the net-effect is the same
- Web IDL - Describes how to construct Exception objects, but doesn't define
propagation rules for subalgorithms.
- HTML - Uses terms like "if [sub-step] fails, throw [Exception] and abort the
[name of overall algorithm]"

I vaguely recall seeing one spec that set out in terminology that exceptions in
algorithms specified in the spec (including sub-algorithms) propagate as the
results of the operation, unless handled, but for the life of me, I can't find

I agree, it's useful to get good terminology here, but I'd love to make sure
we're uniformly consistent and that we're consistent with other specs.

You are receiving this mail because:
You are on the CC list for the bug.
Received on Wednesday, 9 July 2014 19:57:28 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:17:23 UTC