I have a situation that I don't know if others are experiencing - but it has 
happened quite a bit over the last week with 9.2.4

I have the below function.

declare function base:employeeIdMostRecentInstancesBetweenMap ($rangeBeginDate 
as xs:date, $rangeEndDate as xs:date, $employee as element()?, $query as 
function(xs:date, xs:date, item()*) as item()*) as map(xs:string, item()*)
{
let $allInstances := $query($rangeBeginDate, $rangeEndDate, $employee )
let $resultsMap := base:instancesBetweenMap($allInstances, $rangeBeginDate, 
$rangeEndDate)
return
    $resultsMap
};

I then wanted to  put in a statement that would throw an error and return some 
information so that I could debug a situation.  Basically I just added one 
statement to throw the error.  Now when I run, BaseX Gui just spins and spins 
and spins.  No value is returned.  Never gets to this statement.  I take out 
the let statement and it all works again.

declare function base:employeeIdMostRecentInstancesBetweenMap ($rangeBeginDate 
as xs:date, $rangeEndDate as xs:date, $employee as element()?, $query as 
function(xs:date, xs:date, item()*) as item()*) as map(xs:string, item()*)
{
let $foo := error(xs:QName("err"), concat("val: ", "here - this is where I 
would put the info I wanted to display."  ))
let $allInstances := $query($rangeBeginDate, $rangeEndDate, $employee )
let $resultsMap := base:instancesBetweenMap($allInstances, $rangeBeginDate, 
$rangeEndDate)
return
    $resultsMap
};

Any insights you can provide would be greatly appreciated.

Buddy

Reply via email to