comparison org.eclipse.core.commands/src/org/eclipse/core/commands/common/CommandException.d @ 12:bc29606a740c

Added dwt-addons in original directory structure of eclipse.org
author Frank Benoit <benoit@tionex.de>
date Sat, 14 Mar 2009 18:23:29 +0100
parents
children
comparison
equal deleted inserted replaced
11:43904fec5dca 12:bc29606a740c
1 /*******************************************************************************
2 * Copyright (c) 2004, 2008 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 * Port to the D programming language:
11 * Frank Benoit <benoit@tionex.de>
12 *******************************************************************************/
13 module org.eclipse.core.commands.common.CommandException;
14
15 import java.lang.all;
16
17 /**
18 * Signals that an exception occured within the command architecture.
19 * <p>
20 * This class is not intended to be extended by clients.
21 * </p>
22 *
23 * @since 3.1
24 * @noextend This class is not intended to be subclassed by clients.
25 */
26 public abstract class CommandException : Exception {
27
28 /**
29 * Generated serial version UID for this class.
30 *
31 * @since 3.4
32 */
33 private static final long serialVersionUID = 5389763628699257234L;
34
35 /**
36 * This member variable is required here to allow us to compile against JCL
37 * foundation libraries. The value may be <code>null</code>.
38 */
39 // private Exception cause;
40
41 /**
42 * Creates a new instance of this class with the specified detail message.
43 *
44 * @param message
45 * the detail message; may be <code>null</code>.
46 */
47 public this(String message) {
48 super(message);
49 }
50
51 /**
52 * Creates a new instance of this class with the specified detail message
53 * and cause.
54 *
55 * @param message
56 * the detail message; may be <code>null</code>.
57 * @param cause
58 * the cause; may be <code>null</code>.
59 */
60 public this(String message, Exception cause) {
61 super(message);
62 // don't pass the cause to super, to allow compilation against JCL Foundation
63 this.next = cause;
64 }
65
66 /**
67 * Returns the cause of this throwable or <code>null</code> if the
68 * cause is nonexistent or unknown.
69 *
70 * @return the cause or <code>null</code>
71 */
72 public /+override+/ Exception getCause() {
73 return next;
74 }
75
76 }