Appendix C. Error Summary
This appendix lists all of the errors that may be raised during evaluation of a query, in alphabetical order by name. The XQuery spec does not define any programming API defining how queries are executed from, for example, C# or Java; but there is an expectation that in any such API, you will be able to test these error codes to find out what went wrong. In most cases, you can also expect that the error code will be accompanied with an error message that gives much more detailed information.
Error names, which are in the namespace http://www.w3.org/2005/xqt-errors, are broken down into three parts:
A two-character prefix indicating the specification that defines the error, listed in Table C-1.
A two-character category that groups the error messages into their functional meaning. In the case of
XP
andXQ
errors, the categories areST
for static errors,DY
for dynamic errors, andTY
for type errors.A four-digit number.
Table 12-1. Error prefixes
Error prefix |
Meaning |
---|---|
FO |
Functions and Operators |
SE |
Serialization |
XP |
XPath |
XQ |
XQuery |
FOAR0001
Division by zero, which may be raised by the div
or mod
operator (if the operands are xs:integer
or xs:decimal
values) or by the idiv
operator (regardless of the types of the operands). Using the div
operator on values of type xs:float
or xs:double
will not raise this error; it will return INF
or -INF
.
Get XQuery now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.