W3C home > Mailing lists > Public > public-qt-comments@w3.org > February 2004

ORA-FO-266-B: Error codes should be normative (2)

From: Stephen Buxton <Stephen.Buxton@oracle.com>
Date: 17 Feb 04 10:44:18
Message-Id: <200402171844.i1HIiIG04475@rgmgw5.us.oracle.com>
To: public-qt-comments@w3.org

SECTION Annex D: Error Summary

The F&O document (as well as other documents) summarize error codes in an Annex that is labelled to be non-normative.  In some ways, this makes sense, because XQuery does not specify any sort of an API by which errors can be "returned" to any entity.  However, it is clear that there will be more than one such API (e.g., JSR 225, XQJ, is defining such an API for use by Java programmers). 

It would be a serious problem if each API, and each XQuery implementation, were free to return radically different error codes for identical errors, as programmers would be unable to write code that is portable among XQuery engines. 

Some way to make the error codes themselves normative (but, of course, *not* the natural-language phrase that is associated with the codes).

One approach might be to state that whenever the XQuery specification indicates that a specific error is to be raised, that the specified (normative) error code must be made available in an implementation-defined way to the agent that caused the XQuery to be evaluted by the XQuery engine.  This is crude and clumsy, but definitely better than nothing!  The alternative would be to create an SQL-like diagnostics facility that would allow users to execute a subsequent query to retrieve the error code, etc.  I doubt that would be acceptable for XQuery 1.0, but would be deferred to a future version. 

- Steve B.
Received on Tuesday, 17 February 2004 13:44:22 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:18 UTC