cpf.documentSetError

cpf.documentSetError(
   doc as String,
   error as Node?
) as null

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

const cpf = require('/MarkLogic/cpf/cpf');

cpf.documentSetError('/myDocs/example.xml', null);
   
Powered by MarkLogic Server | Terms of Use | Privacy Policy