xdmp:rethrow() as empty-sequence()
Within the catch section of a try-catch expression, re-throw the currently caught error.
try { xdmp:document-delete($uri) } catch ($ex) { (: ignore documents that aren't there :) if ($ex/error:code eq 'XDMP-DOCNOTFOUND') then () else xdmp:rethrow() }