You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.
When options are missing or malformed (or in the wrong database) it would be helpful to say so explicitly. For debugging I've added this code into .../survivorship/merging/base.xqy at line 1844:
declare function merge-impl:get-options($options-name, $format as xs:string)
{
let $opt-uri := $MERGING-OPTIONS-DIR||$options-name||".xml"
let $options-doc := fn:doc($opt-uri)
let $options := $options-doc/merging:options
let $check :=
if (empty($options-doc)) then
(xdmp:log("no options doc:"||$opt-uri),
fn:error(xs:QName("SM-MISSING-CONFIG"), "no options doc found at URI '" || $opt-uri || "' in database: " || xdmp:database-name(xdmp:database()))
)
else if (empty($options)) then
(xdmp:log("no options node in options doc at "||$opt-uri),
fn:error(xs:QName("SM-MISSING-CONFIG"), "no merging:options node found at root of doc(" || $opt-uri || ") in database: " || xdmp:database-name(xdmp:database()))
)
else
(xdmp:log("no problem getting config"))
which does explicit checks and returns a (new) error code when options are missing or malformed, including the URI and DB being checked.
The text was updated successfully, but these errors were encountered:
When options are missing or malformed (or in the wrong database) it would be helpful to say so explicitly. For debugging I've added this code into .../survivorship/merging/base.xqy at line 1844:
declare function merge-impl:get-options($options-name, $format as xs:string)
{
let $opt-uri := $MERGING-OPTIONS-DIR||$options-name||".xml"
let $options-doc := fn:doc($opt-uri)
let $options := $options-doc/merging:options
let $check :=
if (empty($options-doc)) then
(xdmp:log("no options doc:"||$opt-uri),
fn:error(xs:QName("SM-MISSING-CONFIG"), "no options doc found at URI '" || $opt-uri || "' in database: " || xdmp:database-name(xdmp:database()))
)
else if (empty($options)) then
(xdmp:log("no options node in options doc at "||$opt-uri),
fn:error(xs:QName("SM-MISSING-CONFIG"), "no merging:options node found at root of doc(" || $opt-uri || ") in database: " || xdmp:database-name(xdmp:database()))
)
else
(xdmp:log("no problem getting config"))
which does explicit checks and returns a (new) error code when options are missing or malformed, including the URI and DB being checked.
The text was updated successfully, but these errors were encountered: