I've noticed that in the documentation for the fn:error function that the
first parameter can be an xs:QName for the error code. However, when I
xdmp:log the caught error I get the code in the name and the name in the
code field.

Here is the code that I'm running:

xquery version "1.0-ml";

module namespace test = "test-error";

declare function test-error() {
    try {
    fn:error(xs:QName("MY-ERROR"), "my test error", ())
    } catch ($e) {
        xdmp:log($e)
    }
};

and here is what I get in the resulting error xml:

...
<error:code>my test error</error:code>
  <error:name>MY-ERROR</error:name>
...


Any idea why this works this way?
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to