KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > codehaus > loom > interfaces > LoomException


1 /*
2  * Copyright (C) The Loom Group. All rights reserved.
3  *
4  * This software is published under the terms of the Loom
5  * Software License version 1.1, a copy of which has been included
6  * with this distribution in the LICENSE.txt file.
7  */

8 package org.codehaus.loom.interfaces;
9
10 /**
11  * Exception to indicate that a problem occured.
12  *
13  * @author Peter Donald
14  */

15 public final class LoomException
16     extends Exception JavaDoc
17 {
18     /** the cause of the exception. */
19     private final Throwable JavaDoc m_cause;
20
21     /**
22      * Construct a new <code>LoomException</code> instance.
23      *
24      * @param message The detail message for this exception.
25      */

26     public LoomException( final String JavaDoc message )
27     {
28         this( message, null );
29     }
30
31     /**
32      * Construct a new <code>LoomException</code> instance.
33      *
34      * @param message The detail message for this exception.
35      * @param throwable the root cause of the exception
36      */

37     public LoomException( final String JavaDoc message, final Throwable JavaDoc throwable )
38     {
39         super( message );
40         m_cause = throwable;
41     }
42
43     /**
44      * Return the cause of exception.
45      *
46      * @return the cause of exception. (May be null).
47      */

48     public Throwable JavaDoc getCause()
49     {
50         return m_cause;
51     }
52 }
53
Popular Tags