- From: Christian Grün <christian.gruen@gmail.com>
- Date: Tue, 19 Nov 2013 12:01:10 +0100
- To: John Lumley <john@saxonica.com>
- Cc: EXPath ML <public-expath@w3.org>, Jirka Kosek <jirka@kosek.cz>
> 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
Received on Tuesday, 19 November 2013 11:01:57 UTC