F+O: error() function

At some stage we appear to have switched from allowing any item as an
argument to the error() function, to allowing only a QName.

Using QNames is nice for big production applications like docbook that need
to manage their error handling and localize their error messages. For
one-off ad-hoc queries, it's not appropriate: in such cases, you want to
output the error message directly as a string. Enabling i18n, for users who
want it, is reasonable; requiring programmers who are probably the sole
readers of their own messages to set up separate message files is
unreasonable.

The error() function should allow a string as an argument.

Otherwise, expect to see lots of error messages disguised as names:

Invalid-parameter-value-supplied-to-XYZ...Value-must-be-less-than-100

Michael Kay
Software AG

Received on Tuesday, 23 September 2003 13:01:52 UTC