MarkLogic 9 Product Documentation
cpf:document-set-error

cpf:document-set-error(
   $doc as xs:string,
   $error as node()?
) as empty-sequence()

Summary

Set the document's error trace to the given value.

Parameters
doc The URI of the document.
error The error causing processing failure, or empty to erase the existing trace.

Usage Notes

In general, applications should not not need to set the error trace of a document. cpf:failure will automatically set this trace, and cpf:success will clear it.

Example

  xquery version "1.0-ml";
  import module namespace cpf = "http://marklogic.com/cpf" 
      at "/MarkLogic/cpf/cpf.xqy";

  cpf:document-set-error( "/myDocs/example.xml", () )
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy