Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/aendvari/common/model/ModelParserException.java


1   /*
2    * ModelParserException.java
3    *
4    * Copyright (c) 2001, 2002 Aendvari, Ltd. All Rights Reserved.
5    *
6    * See the file LICENSE for terms of use.
7    *
8    */
9   
10  package com.aendvari.common.model;
11  
12  /**
13   * <p>Thrown when an input can not be properly read as a Model structure. The
14   * causing exception, if any, is available in the <code>exception</code> property.</p>
15   *
16   * @author  Trevor Milne
17   *
18   */
19  
20  public class ModelParserException extends Exception
21  {
22    /** The exception that caused this exception, may be null. */
23    protected Throwable rootCause;
24  
25  
26    /* Constructors. */
27  
28  
29    /**
30     * Creates a <code>ModelParserException</code> instance with a causing exception.
31     *
32     * @param    setRootCause        The exception causing this exception.
33     *
34     */
35  
36    public ModelParserException(Throwable setRootCause)
37    {
38      rootCause = setRootCause;
39    }
40  
41  
42    /* Accessors. */
43  
44  
45    /**
46     * Returns the exception that caused this exception, null if none.
47     *
48     */
49  
50    public Throwable getRootCause()
51    {
52      return rootCause;
53    }
54  
55    /**
56     * Returns a string representation of the exception.
57     *
58     */
59  
60    public String toString()
61    {
62      return (super.toString() + "; cause=" + rootCause);
63    }
64  }
65