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

Re: Binary Module error codes

From: Florent Georges <fgeorges@fgeorges.org>
Date: Mon, 5 Aug 2013 11:21:58 +0100
Message-ID: <CADyR_r2O7_e+g3EeYuEwOeeHE=XzNY7kv8_fHCt+dVj3AAooTg@mail.gmail.com>
To: John Lumley <john@saxonica.com>
Cc: EXPath CG <public-expath@w3.org>
On 5 August 2013 09:39, John Lumley wrote:

  Hi John,

> I was under the impression that some similarity with XPath
> error code formats was suggested, which uses a 4 character/ 4
> number system.  In EXPath, the file: and the sql: modules uses
> that (though sql: isn't entirely consistent), albeit not
> encoding program/phase in the 4 characters.  crypto: and
> http-client: use short codes.

  Thanks for pointing out the inconsistencies!

  Actually, I thought again about error codes over the weekend,
and I am not sure that using one different namespace for errors,
one global to all EXPath modules, is the best way.  It was indeed
kind of mimicking XPath error codes.  But there is no reason to
use another namespace than the module namespace, and certainly
not to put all of the error codes in the same namespace.

  I think it would be cleaner actually to have the error codes in
the module namespace.  For instance we could have bin:ERR001.
In XQuery 3.0, a try/catch would look like:

    try {
    catch http:ERR006 {
    catch bin:ERR005 {

which makes more sense I think than the following:

    try {
    catch err:HC006 {
    catch err:BIN005 {

  I think it is still time to change the error handling, and we
should define it once and for all (in order to not have that
discussion again for new modules :-p).

  What do you (all) think?  Regards,

Florent Georges
Received on Monday, 5 August 2013 10:22:45 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:52:20 UTC