01: /*
02: * SdpException.java
03: *
04: * Created on December 18, 2001, 11:08 AM
05: */
06:
07: package javax.sdp;
08:
09: /** The SdpException defines a general exception for the SDP classes to throw when they encounter a difficulty.
10: *
11: * @author deruelle
12: * @version 1.0
13: */
14: public class SdpException extends Exception {
15:
16: /** Creates new SdpException
17: */
18: public SdpException() {
19: super ();
20: }
21:
22: /** Constructs a new SdpException with the message you specify.
23: * @param message a String specifying the text of the exception message
24: */
25: public SdpException(String message) {
26: super (message);
27: }
28:
29: /** Constructs a new SdpException when the Codelet needs to throw an
30: * exception and include a message about another exception that interfered
31: * with its normal operation.
32: * @param message a String specifying the text of the exception message
33: * @param rootCause the Throwable exception that interfered with the
34: * Codelet's normal operation, making this Codelet exception necessary
35: */
36: public SdpException(String message, Throwable rootCause) {
37: super (rootCause.getMessage() + ";" + message);
38: }
39:
40: /** Constructs a new SdpException as a result of a system exception and uses
41: * the localized system exception message.
42: * @param rootCause the system exception that makes this SdpException necessary
43: */
44: public SdpException(Throwable rootCause) {
45: super (rootCause.getLocalizedMessage());
46: }
47:
48: /** Returns the Throwable system exception that makes this SdpException necessary.
49: * @return Throwable
50: */
51: public Throwable getRootCause() {
52: return fillInStackTrace();
53: }
54:
55: }
|