KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > gulden > util > xml > XMLException


1 /*
2  * Project: Gulden Utilies
3  * Class: de.gulden.util.xml.XMLException
4  * Version: snapshot-beautyj-1.1
5  *
6  * Date: 2004-09-29
7  *
8  * This is a snapshot version of the Gulden Utilities,
9  * it is not released as a seperate version.
10  *
11  * Note: Contains auto-generated Javadoc comments created by BeautyJ.
12  *
13  * This is licensed under the GNU Lesser General Public License (LGPL)
14  * and comes with NO WARRANTY.
15  *
16  * Author: Jens Gulden
17  * Email: amoda@jensgulden.de
18  */

19
20 package de.gulden.util.xml;
21
22 import java.io.IOException JavaDoc;
23 import java.util.*;
24 import org.w3c.dom.Element JavaDoc;
25
26 /**
27  * Class XMLException.
28  *
29  * @author Jens Gulden
30  * @version snapshot-beautyj-1.1
31  */

32 public class XMLException extends IOException JavaDoc {
33
34     // ------------------------------------------------------------------------
35
// --- fields ---
36
// ------------------------------------------------------------------------
37

38     /**
39      * The element.
40      */

41     protected Element JavaDoc element;
42
43     /**
44      * The wrapped throwable.
45      */

46     protected Throwable JavaDoc wrappedThrowable;
47
48
49     // ------------------------------------------------------------------------
50
// --- constructors ---
51
// ------------------------------------------------------------------------
52

53     /**
54      * Creates a new instance of XMLException.
55      */

56     public XMLException() {
57         super();
58         element=null;
59     }
60
61     /**
62      * Creates a new instance of XMLException.
63      */

64     public XMLException(String JavaDoc msg) {
65         this(msg,(Element JavaDoc)null);
66     }
67
68     /**
69      * Creates a new instance of XMLException.
70      */

71     public XMLException(String JavaDoc msg, Element JavaDoc element) {
72         super(msg);
73         this.element=element;
74     }
75
76     /**
77      * Creates a new instance of XMLException.
78      */

79     public XMLException(Throwable JavaDoc throwable) {
80         this("["+throwable.getClass().getName()+": "+throwable.getMessage()+"]",throwable);
81     }
82
83     /**
84      * Creates a new instance of XMLException.
85      */

86     public XMLException(String JavaDoc msg, Throwable JavaDoc throwable) {
87         this(msg);
88         setWrappedThrowable(throwable);
89     }
90
91
92     // ------------------------------------------------------------------------
93
// --- methods ---
94
// ------------------------------------------------------------------------
95

96     /**
97      * Returns the wrapped throwable.
98      */

99     public Throwable JavaDoc getWrappedThrowable() {
100         return wrappedThrowable;
101     }
102
103     /**
104      * Sets the wrapped throwable.
105      */

106     public void setWrappedThrowable(Throwable JavaDoc _wrappedThrowable) {
107         wrappedThrowable = _wrappedThrowable;
108     }
109
110 } // end XMLException
111
Popular Tags