01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.contexts;
11:
12: /**
13: * Signals that an exception occurred within the context architecture.
14: * <p>
15: * This class is not intended to be extended by clients.
16: * </p>
17: *
18: * @since 3.0
19: * @deprecated Please use the "org.eclipse.core.commands" plug-in instead.
20: * @see org.eclipse.core.commands.common.CommandException
21: */
22: public abstract class ContextException extends Exception {
23:
24: /**
25: * Generated serial version UID for this class.
26: *
27: * @since 3.4
28: */
29: private static final long serialVersionUID = -5143404124388080211L;
30:
31: private Throwable cause;
32:
33: /**
34: * Creates a new instance of this class with the specified detail message.
35: *
36: * @param message
37: * the detail message.
38: */
39: public ContextException(String message) {
40: super (message);
41: }
42:
43: /**
44: * Creates a new instance of this class with the specified detail message
45: * and cause.
46: *
47: * @param message
48: * the detail message.
49: * @param cause
50: * the cause.
51: */
52: public ContextException(String message, Throwable cause) {
53: super (message);
54: // don't pass the cause to super, to allow compilation against JCL Foundation
55: this .cause = cause;
56: }
57:
58: /**
59: * Returns the cause of this throwable or <code>null</code> if the
60: * cause is nonexistent or unknown.
61: *
62: * @return the cause or <code>null</code>
63: * @since 3.1
64: */
65: public Throwable getCause() {
66: return cause;
67: }
68:
69: }
|