I have created templates for documents present in my ML content database without <invalid-values>ignore</invalid-values>
. So, my code throws TDE-INDEX error when there is an invalid row value during create / update of the document.
TDE-INDEX: xdmp:eval("xquery version "1.0-ml"; import module namesp...", (), ****...) -- Error applying template /template.xml to document /workid.xml: TDE-EVALFAILED: Eval for Column subject_name='$subject[@code eq $subject_code]/text()' returns multiple values (only one is expected)
Now I have a requirement where I need to track this error in the ErrorLog.txt file and continue the document insertion.
From the Marklogic documents regarding TDE, I could see this can be handled in two ways.
Setting
<invalid-values>ignore</invalid-values>
and we cannot log the error and it would continue the operationWithout the option, the error would be thrown and the processing would be stopped.
Now there are two questions for which I'm looking answers for:
Is it possible to catch the TDE errors using try/catch expression?
Is it possible to log the TDE error and allow document insert/update operation?