View Javadoc

1   /*
2    * Copyright 2001-2004 (C) MetaStuff, Ltd. All Rights Reserved.
3    * 
4    * This software is open source. 
5    * See the bottom of this file for the licence.
6    * 
7    * $Id: InvalidXPathException.java,v 1.4 2004/06/25 08:03:33 maartenc Exp $
8    */
9   
10  package org.dom4j;
11  
12  /*** <p><code>InvalidXPathException</code> is thrown when an invalid
13    * XPath expression is used to traverse an XML document</p>
14    *
15    * @version $Revision: 1.4 $
16    */
17  public class InvalidXPathException extends IllegalArgumentException {
18  
19      public InvalidXPathException(String xpath) {
20          super( "Invalid XPath expression: " + xpath );
21      }
22      
23      public InvalidXPathException(String xpath, String reason) {
24          super( "Invalid XPath expression: " + xpath + " " + reason );
25      }
26  }
27  
28  
29  
30  
31  /*
32   * Redistribution and use of this software and associated documentation
33   * ("Software"), with or without modification, are permitted provided
34   * that the following conditions are met:
35   *
36   * 1. Redistributions of source code must retain copyright
37   *    statements and notices.  Redistributions must also contain a
38   *    copy of this document.
39   *
40   * 2. Redistributions in binary form must reproduce the
41   *    above copyright notice, this list of conditions and the
42   *    following disclaimer in the documentation and/or other
43   *    materials provided with the distribution.
44   *
45   * 3. The name "DOM4J" must not be used to endorse or promote
46   *    products derived from this Software without prior written
47   *    permission of MetaStuff, Ltd.  For written permission,
48   *    please contact dom4j-info@metastuff.com.
49   *
50   * 4. Products derived from this Software may not be called "DOM4J"
51   *    nor may "DOM4J" appear in their names without prior written
52   *    permission of MetaStuff, Ltd. DOM4J is a registered
53   *    trademark of MetaStuff, Ltd.
54   *
55   * 5. Due credit should be given to the DOM4J Project - 
56   *    http://www.dom4j.org
57   *
58   * THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS
59   * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
60   * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
61   * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
62   * METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
63   * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
64   * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
65   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
66   * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
67   * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
68   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
69   * OF THE POSSIBILITY OF SUCH DAMAGE.
70   *
71   * Copyright 2001-2004 (C) MetaStuff, Ltd. All Rights Reserved.
72   *
73   * $Id: InvalidXPathException.java,v 1.4 2004/06/25 08:03:33 maartenc Exp $
74   */