W3C home > Mailing lists > Public > public-expath@w3.org > November 2013

Re: Final draft of Proposed Binary Module

From: John Lumley <john@saxonica.com>
Date: Mon, 25 Nov 2013 11:51:47 +0000
Message-ID: <529339D3.5010506@saxonica.com>
To: Christian Grün <christian.gruen@gmail.com>
CC: EXPath ML <public-expath@w3.org>, Jirka Kosek <jirka@kosek.cz>
On 19/11/2013 11:01, Christian Grün wrote:
>> I'm inclinded to have two errors: [index-before-start] and [index-after-end]
>> - differentiating between them, which the machine of course can do, makes it
>> easier to track the error - before-start is more likely to be $offset wrong
>> etc.
> I tend to handle semantically similar errors in the same way. As you
> already indicated, before-start is “more likely to be $offset wrong”,
> but as we don’t have any guarantee, both values need to be checked in
> both catch branches to be sure what was going on. Personally, I would
> even treat all out-of-bounds errors (incl. negative-offset and
> negative-size) with a single code for the very same reason; otherwise,
> the resulting XQuery code may get too bloated. What I wouldn’t do,
> however, is to also accept and normalize negative values, as has been
> done in XPath 1.0.
>
> Just my two (verbose) cents
> Christian
>
Understood. As Mike pointed out more detailed error information can be 
provided through messages or the error reporting variables. I've changed 
the 'index-before-start'/'index-after-end' to a single 
'index-out-of-range', though a 'size-negative' has been retained 
separately. I have to admit the spec looks a bit 'cleaner'!  The test 
case error codes are being changed accordingly (I'll look through your 
set today.)


-- 
*John Lumley* MA PhD CEng FIEE
john@saxonica.com <mailto:john@saxonica.com>
on behalf of Saxonica Ltd
Received on Monday, 25 November 2013 11:52:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:47:37 UTC