Loading TOC...

MarkLogic 10 Product Documentation
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);
   

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.