001: /**
002: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
003: * Unpublished - rights reserved under the Copyright Laws of the United States.
004: * Copyright © 2003 Sun Microsystems, Inc. All rights reserved.
005: * Copyright © 2005 BEA Systems, Inc. All rights reserved.
006: *
007: * Use is subject to license terms.
008: *
009: * This distribution may include materials developed by third parties.
010: *
011: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
012: *
013: * Module Name : JSIP Specification
014: * File Name : SipException.java
015: * Author : Phelim O'Doherty
016: *
017: * HISTORY
018: * Version Date Author Comments
019: * 1.1 08/10/2002 Phelim O'Doherty
020: *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
021: */package javax.sip;
022:
023: /**
024:
025: * A SipException is thrown when a general SIP exception is encountered, when
026:
027: * no other specialized exception defined in this specification can handle
028:
029: * the error.
030:
031: *
032:
033: * @author BEA Systems, NIST
034: * @version 1.2
035:
036: */
037:
038: public class SipException extends Exception {
039:
040: /**
041:
042: * Constructs a new <code>SipException</code>
043:
044: */
045:
046: public SipException() {
047:
048: super ();
049:
050: }
051:
052: /**
053:
054: * Constructs a new <code>SipException</code> with the specified error
055:
056: * message.
057:
058: *
059:
060: * @param message the error message of this Exception.
061:
062: */
063:
064: public SipException(String message) {
065:
066: super (message);
067:
068: }
069:
070: /**
071:
072: * Constructs a new <code>SipException</code> with the specified error
073:
074: * message and specialized cause that triggered this error condition.
075:
076: *
077:
078: * @param message the detail of the error message
079:
080: * @param cause the specialized cause that triggered this exception
081:
082: */
083:
084: public SipException(String message, Throwable cause) {
085: super (message);
086: m_Cause = cause;
087: }
088:
089: /**
090: * Returns the cause of this throwable or null if the cause is
091: * nonexistent or unknown. (The cause is the throwable that caused this
092: * throwable to get thrown.) This implementation returns the cause that
093: * was supplied via the constructor requiring a Throwable.
094: *
095: * @return the cause of this throwable or null if the cause is
096: * nonexistent or unknown.
097: */
098: public Throwable getCause() {
099: return (m_Cause);
100: }
101:
102: /**
103: * The specialized cause that triggered this Exception. This cause
104: * informs an application of the underlying implementation problem that
105: * triggered this Exception.
106: */
107: protected Throwable m_Cause = null;
108:
109: }
|