01: /**
02: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
03: * Unpublished - rights reserved under the Copyright Laws of the United States.
04: * Copyright © 2003 Sun Microsystems, Inc. All rights reserved.
05: * Copyright © 2005 BEA Systems, Inc. All rights reserved.
06: *
07: * Use is subject to license terms.
08: *
09: * This distribution may include materials developed by third parties.
10: *
11: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12: *
13: * Module Name : JSIP Specification
14: * File Name : InvalidArgumentException.java
15: * Author : Phelim O'Doherty
16: *
17: * HISTORY
18: * Version Date Author Comments
19: * 1.1 08/10/2002 Phelim O'Doherty
20: *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21: */package javax.sip;
22:
23: /**
24: * This exception class is thrown by an implementation when given an invalid
25: * argument such as a invalid numerical value.
26: *
27: * @author BEA Systems, NIST
28: * @version 1.2
29: */
30: public class InvalidArgumentException extends Exception {
31:
32: /**
33: * Create an <code>InvalidArgumentException</code> with no detail message.
34: */
35: public InvalidArgumentException() {
36: }
37:
38: /**
39: * Create an <code>InvalidArgumentException</code> with a detail message.
40: *
41: * @param message the detail message.
42: */
43: public InvalidArgumentException(String message) {
44: super (message);
45: }
46:
47: /**
48: * Constructs a new <code>InvalidArgumentException</code> with the
49: * specified error message and specialized cause that triggered this error
50: * condition.
51: *
52: * @param message the detail of the error message
53: * @param cause the specialized cause that triggered this exception
54: */
55: public InvalidArgumentException(String message, Throwable cause) {
56: super (message);
57: m_Cause = cause;
58: }
59:
60: /**
61: * Returns the cause of this throwable or null if the cause is
62: * nonexistent or unknown. (The cause is the throwable that caused this
63: * throwable to get thrown.) This implementation returns the cause that
64: * was supplied via the constructor requiring a Throwable.
65: *
66: * @return the cause of this throwable or null if the cause is
67: * nonexistent or unknown.
68: */
69: public Throwable getCause() {
70: return (m_Cause);
71: }
72:
73: /**
74: * The specialized cause that triggered this Exception. This cause
75: * informs an application of the underlying implementation problem that
76: * triggered this Exception.
77: */
78: protected Throwable m_Cause = null;
79:
80: }
|