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

https://www.w3.org/Bugs/Public/show_bug.cgi?id=26301

--- 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.
http://dom.spec.whatwg.org/#interface-parentnode
- 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
it.

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