001/* 002 * Copyright (c) 2004 World Wide Web Consortium, 003 * 004 * (Massachusetts Institute of Technology, European Research Consortium for 005 * Informatics and Mathematics, Keio University). All Rights Reserved. This 006 * work is distributed under the W3C(r) Software License [1] in the hope that 007 * it will be useful, but WITHOUT ANY WARRANTY; without even the implied 008 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 009 * 010 * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 011 */ 012 013package org.w3c.dom.xpath; 014 015/** 016 * A new exception has been created for exceptions specific to these XPath 017 * interfaces. 018 * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-XPath-20040226'>Document Object Model (DOM) Level 3 XPath Specification</a>. 019 */ 020public class XPathException extends RuntimeException { 021 public XPathException(short code, String message) { 022 super(message); 023 this.code = code; 024 } 025 public short code; 026 // XPathExceptionCode 027 /** 028 * If the expression has a syntax error or otherwise is not a legal 029 * expression according to the rules of the specific 030 * <code>XPathEvaluator</code> or contains specialized extension 031 * functions or variables not supported by this implementation. 032 */ 033 public static final short INVALID_EXPRESSION_ERR = 51; 034 /** 035 * If the expression cannot be converted to return the specified type. 036 */ 037 public static final short TYPE_ERR = 52; 038 039}