BaseXdb/basex — Issue #266: Try/Catch Circumvents Reset of Context
Author: LeoWoerteler
Created: 2011-11-13 23:23:13+00:00
State: open
Labels: bug, XQuery

If an exception is thrown during query execution, some language constructs that change the context don't reset it. This leads to context items escaping their scope.

Query:
--------

```xquery
try {
{42[error()]}
} catch * {
.
}
```

Result:
----------
```xquery
42
```