From 95aaa53d6898a8bdcd612f8fb8c9d45f8fffdb30 Mon Sep 17 00:00:00 2001 From: Martin Fechner Date: Wed, 25 May 2022 16:07:29 +0200 Subject: [PATCH] Bugfix remove try and catch --- content/edweb-api.xql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/edweb-api.xql b/content/edweb-api.xql index 03bcdf9..8b836d1 100644 --- a/content/edweb-api.xql +++ b/content/edweb-api.xql @@ -1041,7 +1041,7 @@ declare function edwebapi:get-objects( $root as xs:string ) as node()* { - try { + (: try { :) if (xmldb:collection-available($data-collection||$collection)) then util:eval("collection($data-collection||$collection)//"||$root) @@ -1051,9 +1051,9 @@ declare function edwebapi:get-objects( else error(xs:QName("edwebapi:get-objects-002"), "Can't find collection or resource. data-collection: " ||$data-collection||", collection/resource: "||$collection) - } - catch * { error(xs:QName("edwebapi:get-objects-001"), "Can't load objects. data-collection: " - ||$data-collection||", collection: "||$collection||", root: "||$root) + (: } :) + (: catch * { error(xs:QName("edwebapi:get-objects-001"), "Can't load objects. data-collection: " :) + (: ||$data-collection||", collection: "||$collection||", root: "||$root) :) } (: TODO: Hack for exist-db 4.6.1 This can probably be solved more elegantly :) (:~ util:eval("collection('" || $collection || "')//" || $xpath) ~:)