Project

Profile

Help

Error context

Added by Vladimir Nesterovsky about 5 years ago

In class ResultDocument.java I see the following:

        try {
            content.process(context);
        } catch (XPathException err) {
            err.setXPathContext(context);
            err.maybeSetLocation(getLocation());
            throw err;
        } finally {

err.setXPathContext(context); resets context of the exception and makes it not possible to diagnose exact point of error.

Is this by intention?


Replies (2)

RE: Error context - Added by Michael Kay about 5 years ago

It should probably be

err.maybeSetContext()

but it's just possible there was a reason - ResultDocument needs careful handling because of asynchrony.

RE: Error context - Added by Vladimir Nesterovsky about 5 years ago

To workaround of this behavior we eagerly evaluated content outside of xsl:result-document. This revealed the correct error point.

This approach, however, is at least not convenient.

    (1-2/2)

    Please register to reply