[Bug 18877] [XQ30] try/catch

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

Ghislain Fourny <g@28.io> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |g@28.io

--- Comment #19 from Ghislain Fourny <g@28.io> ---
I like Andrew's comment a lot. I also think we could push recursion down in the
wording, i.e., just say:

"A try/catch expression catches dynamic errors and type errors raised or
forwarded by the evaluation of the target expression of the try clause."

With the understanding that:

- An expression _raises_ an error if the error is "freshly created" according
to the semantics of the expression. Example: "foo" + 1 raises an error because
it has directly to do with the semantics of addition.

- An expression _forwards_ an error that has been already raised or forwarded
(the recursion is here) by an operand expression. When an error is forwarded
and when not is left to the (already existing) semantics of each expression,
for example if the condition is true, then a conditional expression does not
forward an error raised or forwarded by the else clause, but it does forward an
error raised or forwarded by its then clause. Likewise, a try-catch expression
does not forward an error raised or forwarded by its try expression if it has
been caught.

That way, we can remove complexity from the semantics of try catch and push it
back to the semantics of each individual expression.

Andrew's previous formulation, which is simpler, can be obtained by removing
the fine distinction between raising and forwarding an error.

I hope this makes sense?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 11 June 2013 14:58:28 UTC