This section discusses behavioral changes in XQuery.
For details on any of these changes, see the Web Services and XQuery Developer's Guide.
The behavior of the XQuery function
fn:error()
has changed in version 6.1.2.
In earlier versions, if an exception was thrown for any reason, an HTML
response with the details of the exception was returned, with a status code
of
500: Internal Server Error
.
In the current version, the third argument in the three-argument version
of
fn:error()
is used to specify the error sequence. If
an error raised by
fn:error()
is not caught, the contents of the third
argument, if any, are serialized and returned as the body of the HTTP response.
In the case of SOAP faults generated by the MDEX Web service, this appears in
the
ErrorSequence
element of the
mdata:Fault
.
The way errors are caught, handled, and reported in Web services and XQuery has changed in version 6.1.2.
in previous releases, all exceptions generated the same message, EXTF0001. In this there are a number of more detailed error codes. These codes supplement those provided by and explained in the XQuery specification. In addition, you can now use try/catch expressions for custom error handling.