01: package net.sf.saxon.trans;
02:
03: /**
04: * When tree construction is deferred, innocuous methods such as NodeInfo#getLocalName() may
05: * trigger a dynamic error. Rather than make all such methods on NodeInfo throw a checked XPathException,
06: * we instead throw an UncheckedXPathException, which is a simple wrapper for an XPathException.
07: * Appropriate places in the code must check for this condition and translate it back into an
08: * XPathException.
09: */
10:
11: public class UncheckedXPathException extends RuntimeException {
12:
13: private XPathException cause;
14:
15: public UncheckedXPathException(XPathException cause) {
16: this .cause = cause;
17: }
18:
19: public XPathException getXPathException() {
20: return cause;
21: }
22: }
|