Hi Folks,
I wrapped an xdmp:document-load() in a try-catch block but it doesn't catch
the error and allow me to take corrective action.
I experimented with it in cq and still get an error, for example, given the
following query:
try {
let $uri := "/base-uri/docname.xml"
let $url := "http://[server]/[docpath]/docname.xml"
let $options :=
<options xmlns="xdmp:document-load" >
<uri>{$uri}</uri>
</options>
let $properties :=
<properties>
<datetime>2010-07-06-04:00</datetime>
</properties>
return xdmp:document-load($url, $options)
}
catch($e) {
"Problem loading file, received the following exception: ", $e
}
The result is as follows:
query evaluated in fabrication at Modules:/ as 1.0-ml (cq v4.1-1)
[1.0-ml] XDMP-DOCUTF8SEQ: xdmp:eval("try { let $uri :=
":/base-uri/...", (), <options
xmlns="xdmp:eval"><database>10474121819804666683</database><modules>15178358
166571...</options>) -- Invalid UTF-8 escape sequence at
http://[server]/[docpath]/docname.xml line 68 -- document is not UTF-8
encoded
Stack trace:
in /eval.xqy line 111:
I expected the error to begin with: "Problem loading file, received the
following exception: "
Tim Meagher
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general