Project

Profile

Help

Revision e40b0367

Added by Michael Kay about 1 year ago

Fix bug #4621

View differences:

latest10/hej/net/sf/saxon/expr/Atomizer.java
10 10
import net.sf.saxon.event.ReceiverOption;
11 11
import net.sf.saxon.expr.instruct.Block;
12 12
import net.sf.saxon.expr.instruct.Choose;
13
import net.sf.saxon.expr.instruct.TerminationException;
13 14
import net.sf.saxon.expr.instruct.ValueOf;
14 15
import net.sf.saxon.expr.parser.*;
15 16
import net.sf.saxon.functions.Error;
......
358 359
        try {
359 360
            SequenceIterator base = getBaseExpression().iterate(context);
360 361
            return getAtomizingIterator(base, untyped && operandItemType instanceof NodeTest);
362
        } catch (TerminationException | Error.UserDefinedXPathException e) {
363
            throw e;
361 364
        } catch (XPathException e) {
362
            if (roleDiagnostic == null || e instanceof Error.UserDefinedXPathException) {
365
            if (roleDiagnostic == null) {
363 366
                throw e;
364 367
            } else {
365 368
                String message = expandMessage(e.getMessage());
latest10/hej/net/sf/saxon/expr/SingletonAtomizer.java
8 8
package net.sf.saxon.expr;
9 9

  
10 10
import net.sf.saxon.Configuration;
11
import net.sf.saxon.expr.instruct.TerminationException;
11 12
import net.sf.saxon.expr.parser.*;
12 13
import net.sf.saxon.functions.Error;
13 14
import net.sf.saxon.ma.map.MapType;
......
219 220
            AtomicSequence seq;
220 221
            try {
221 222
                seq = item.atomize();
223
            } catch (TerminationException | Error.UserDefinedXPathException e) {
224
                throw e;
222 225
            } catch (XPathException e) {
223
                if (roleDiagnostic == null || e instanceof Error.UserDefinedXPathException) {
226
                if (roleDiagnostic == null) {
224 227
                    throw e;
225 228
                } else {
226 229
                    String message = e.getMessage() + ". Failed while atomizing the " + roleDiagnostic.getMessage();

Also available in: Unified diff