001: /*
002: * Project: Gulden Utilies
003: * Class: de.gulden.util.xml.XMLException
004: * Version: snapshot-beautyj-1.1
005: *
006: * Date: 2004-09-29
007: *
008: * This is a snapshot version of the Gulden Utilities,
009: * it is not released as a seperate version.
010: *
011: * Note: Contains auto-generated Javadoc comments created by BeautyJ.
012: *
013: * This is licensed under the GNU Lesser General Public License (LGPL)
014: * and comes with NO WARRANTY.
015: *
016: * Author: Jens Gulden
017: * Email: amoda@jensgulden.de
018: */
019:
020: package de.gulden.util.xml;
021:
022: import java.io.IOException;
023: import java.util.*;
024: import org.w3c.dom.Element;
025:
026: /**
027: * Class XMLException.
028: *
029: * @author Jens Gulden
030: * @version snapshot-beautyj-1.1
031: */
032: public class XMLException extends IOException {
033:
034: // ------------------------------------------------------------------------
035: // --- fields ---
036: // ------------------------------------------------------------------------
037:
038: /**
039: * The element.
040: */
041: protected Element element;
042:
043: /**
044: * The wrapped throwable.
045: */
046: protected Throwable wrappedThrowable;
047:
048: // ------------------------------------------------------------------------
049: // --- constructors ---
050: // ------------------------------------------------------------------------
051:
052: /**
053: * Creates a new instance of XMLException.
054: */
055: public XMLException() {
056: super ();
057: element = null;
058: }
059:
060: /**
061: * Creates a new instance of XMLException.
062: */
063: public XMLException(String msg) {
064: this (msg, (Element) null);
065: }
066:
067: /**
068: * Creates a new instance of XMLException.
069: */
070: public XMLException(String msg, Element element) {
071: super (msg);
072: this .element = element;
073: }
074:
075: /**
076: * Creates a new instance of XMLException.
077: */
078: public XMLException(Throwable throwable) {
079: this ("[" + throwable.getClass().getName() + ": "
080: + throwable.getMessage() + "]", throwable);
081: }
082:
083: /**
084: * Creates a new instance of XMLException.
085: */
086: public XMLException(String msg, Throwable throwable) {
087: this (msg);
088: setWrappedThrowable(throwable);
089: }
090:
091: // ------------------------------------------------------------------------
092: // --- methods ---
093: // ------------------------------------------------------------------------
094:
095: /**
096: * Returns the wrapped throwable.
097: */
098: public Throwable getWrappedThrowable() {
099: return wrappedThrowable;
100: }
101:
102: /**
103: * Sets the wrapped throwable.
104: */
105: public void setWrappedThrowable(Throwable _wrappedThrowable) {
106: wrappedThrowable = _wrappedThrowable;
107: }
108:
109: } // end XMLException
|