BaseXdb/basex — Issue #265: Try/Catch is Too Lazy
Author: LeoWoerteler
Created: 2011-11-13 23:11:09+00:00
State: open
Labels: bug, XQuery

The try/catch construct should evaluate its argument strictly, to avoid catching an error after parts of the result have already been returned.

Query:
---------

```xquery
try {
for $i in (42,0)
return 1 idiv $i
} catch * {

}
```

Result:
---------
```xml
0
```