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

RE: [XQuery]&[F&O] fn:error: function parameters

From: Michael Kay <mhk@mhk.me.uk>
Date: Tue, 28 Sep 2004 23:20:46 +0100
To: "'Ashok Malhotra'" <ashok.malhotra@oracle.com>, "'Andrey Fomichev'" <fomichev@ispras.ru>, <public-qt-comments@w3.org>
Message-ID: <E1CCQLZ-0000h5-1b@frink.w3.org>

> The WGs discussed your request on the telcon today.  Since, 
> as a rule, we do not overload function
> signatures we cannot have one signature for fn:error that 
> takes a single QName and another that takes
> a single string.  So, we decided to change the third and 
> fourth signatures of fn:error and make the
> QName optional.  In these two cases, if you pass the empty 
> sequence as the first (QName) argument
> the function behaves as if you had passed the QName 
> corresponding to err:FOER0000 -- Unidentified Error.

A mischievous note: it is therefore an error to call the function with a
single string argument, e.g.

error("No input")

But since it's implementation-defined what the error message for this error
is, an implementation that outputs "Error: No input" would be entirely

Michael Kay
Received on Tuesday, 28 September 2004 22:21:21 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:56:59 UTC