XPathException
class in package org.w3c.dom.xpath

    public class XPathException extends Exception:

Object
└ Exception
└ XPathException

Exception raised by DOM XPath operations.

Klyn follows the Java `org.w3c.dom.xpath` constants for compatibility: `INVALID_EXPRESSION_ERR` is `1` and `TYPE_ERR` is `2`.

@example ```klyn import org.w3c.dom.xpath

error = XPathException(XPathException.INVALID_EXPRESSION_ERR, "Unsupported XPath expression") print(error.code) print(error.message)

Fields

Modifier and Type | Member | Description
--- | --- | ---
public static readonly | INVALID_EXPRESSION_ERR `INVALID_EXPRESSION_ERR as Int = 1` | Raised when an XPath expression is syntactically invalid or uses an unsupported feature.
public static readonly | TYPE_ERR `TYPE_ERR as Int = 2` | Raised when an XPath result cannot be converted to the requested type.

Properties

Modifier and Type | Member | Description
--- | --- | ---
public readonly property | code `code as Int:` | Numeric XPath error code.

Properties inherited from Exception: message
Properties inherited from Object: type
Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | XPathException `XPathException(code as Int = XPathException.INVALID_EXPRESSION_ERR, message as String = "XPath exception"):` | Creates an XPath exception.

Methods inherited from Exception: toString
Methods inherited from Object: fromJson, toDict, toJson, toString, toXml