KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > contexts > ContextException


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.ui.contexts;
12
13 /**
14  * Signals that an exception occured within the context architecture.
15  * <p>
16  * This class is not intended to be extended by clients.
17  * </p>
18  *
19  * @since 3.0
20  * @deprecated Please use the "org.eclipse.core.commands" plug-in instead.
21  * @see org.eclipse.core.commands.common.CommandException
22  */

23 public abstract class ContextException extends Exception JavaDoc {
24     
25     private Throwable JavaDoc cause;
26
27     /**
28      * Creates a new instance of this class with the specified detail message.
29      *
30      * @param message
31      * the detail message.
32      */

33     public ContextException(String JavaDoc message) {
34         super(message);
35     }
36
37     /**
38      * Creates a new instance of this class with the specified detail message
39      * and cause.
40      *
41      * @param message
42      * the detail message.
43      * @param cause
44      * the cause.
45      */

46     public ContextException(String JavaDoc message, Throwable JavaDoc cause) {
47         super(message);
48         // don't pass the cause to super, to allow compilation against JCL Foundation
49
this.cause = cause;
50     }
51     
52     /**
53      * Returns the cause of this throwable or <code>null</code> if the
54      * cause is nonexistent or unknown.
55      *
56      * @return the cause or <code>null</code>
57      * @since 3.1
58      */

59     public Throwable JavaDoc getCause() {
60         return cause;
61     }
62
63 }
64
Popular Tags