1
2
3
4
5
6
7
8 package org.codehaus.metaclass.introspector;
9
10 /***
11 * Exception if unable to locate MetaClass data
12 * for a particular class.
13 *
14 * @author Peter Donald
15 * @version $Revision: 1.2 $ $Date: 2003/11/27 08:09:53 $
16 */
17 public class MetaClassException
18 extends Exception
19 {
20 /***
21 * The throwable that caused this exception.
22 */
23 private final Throwable m_cause;
24
25 /***
26 * Create an exception with specified message.
27 *
28 * @param message the message
29 */
30 public MetaClassException( final String message )
31 {
32 this( message, null );
33 }
34
35 /***
36 * Create an exception with specified message and cause.
37 *
38 * @param message the message
39 * @param cause the exception that caused this exception
40 */
41 public MetaClassException( final String message,
42 final Throwable cause )
43 {
44 super( message );
45 m_cause = cause;
46 }
47
48 /***
49 * Return the exception that caused this exception (if any).
50 *
51 * @return the exception that caused this exception (if any).
52 */
53 public Throwable getCause()
54 {
55 return m_cause;
56 }
57 }