[Bug 18877] [XQ30] try/catch

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

--- Comment #15 from Michael Kay <mike@saxonica.com> ---
(In reply to comment #13)

> local:func()(0) calls the above function with $arg := 0.  There is no
> try/catch in the function, so no try/catch is available to catch the error. 
> By the time (10 div $arg) is evaluated, the try/catch is irrelevant.

I think we are all in agreement that the try/catch should be irrelevant. The
problem is that the spec, in both its current form and after the proposed
change, says otherwise.

Specifically, the sentence "A try/catch expression catches dynamic errors and
type errors raised during dynamic evaluation of expressions that are lexically
contained within the try clause." implies that in this case, the try/catch
expression is capable of 'acting at a distance' by catching dynamic errors that
occur not during the evaluation of the try/catch expression itself. We know it
doesn't intend to say that, but that's still what it says.

A better formulation would be "A try/catch expression catches dynamic errors
and type errors raised during dynamic evaluation of expressions that are
lexically contained within the try clause and that are evaluated during the
evaluation of the try clause."

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

Received on Tuesday, 4 June 2013 20:08:08 UTC