View Javadoc
1   package org.jaxen;
2   
3   import java.io.PrintStream;
4   import java.io.PrintWriter;
5   
6   /*
7    * $Header: $
8    * $Revision: $
9    * $Date: $
10   *
11   * ====================================================================
12   *
13   * Copyright 2000-2005 bob mcwhirter & James Strachan.
14   * All rights reserved.
15   *
16   *
17   * Redistribution and use in source and binary forms, with or without
18   * modification, are permitted provided that the following conditions are
19   * met:
20   * 
21   *   * Redistributions of source code must retain the above copyright
22   *     notice, this list of conditions and the following disclaimer.
23   * 
24   *   * Redistributions in binary form must reproduce the above copyright
25   *     notice, this list of conditions and the following disclaimer in the
26   *     documentation and/or other materials provided with the distribution.
27   * 
28   *   * Neither the name of the Jaxen Project nor the names of its
29   *     contributors may be used to endorse or promote products derived 
30   *     from this software without specific prior written permission.
31   * 
32   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
33   * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
34   * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
35   * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
36   * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
37   * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
38   * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
39   * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
40   * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
41   * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
42   * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43   *
44   * ====================================================================
45   * This software consists of voluntary contributions made by many
46   * individuals on behalf of the Jaxen Project and was originally
47   * created by bob mcwhirter <bob@werken.com> and
48   * James Strachan <jstrachan@apache.org>.  For more information on the
49   * Jaxen Project, please see <http://www.jaxen.org/>.
50   *
51   * $Id: $
52  */
53  
54  /**
55   * This class exists to wrap Jaxen exceptions that otherwise wouldn't be propagated
56   * up through the axis iterators.
57   */
58  public class JaxenRuntimeException extends RuntimeException
59  {
60  
61      private static final long serialVersionUID = -930309761511911193L;
62  
63      /**
64       * Create a new JaxenRuntimeException.
65       * 
66       * @param cause the nested exception that's wrapped 
67       *     inside this exception
68       */
69      public JaxenRuntimeException(Throwable cause)
70      {
71          super(cause.getMessage());
72          initCause(cause);
73      }
74  
75      /**
76       * Create a new JaxenRuntimeException.
77       * 
78       * @param message the detail message
79       */
80      public JaxenRuntimeException(String message) {
81          super(message);
82      }
83      
84  }