Mercurial > projects > dwt-addons
comparison dwtx/core/commands/common/CommandException.d @ 3:6518c18a01f7
eclipse.core package without osgi dependencies
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 26 Mar 2008 00:57:19 +0100 |
parents | |
children | ea8ff534f622 |
comparison
equal
deleted
inserted
replaced
2:a012107a911c | 3:6518c18a01f7 |
---|---|
1 /******************************************************************************* | |
2 * Copyright (c) 2004, 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 * Port to the D programming language: | |
11 * Frank Benoit <benoit@tionex.de> | |
12 *******************************************************************************/ | |
13 module dwtx.core.commands.common.CommandException; | |
14 | |
15 import dwt.dwthelper.utils; | |
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 */ | |
25 public abstract class CommandException : Exception { | |
26 | |
27 /** | |
28 * This member variable is required here to allow us to compile against JCL | |
29 * foundation libraries. The value may be <code>null</code>. | |
30 */ | |
31 private Exception cause; | |
32 | |
33 /** | |
34 * Creates a new instance of this class with the specified detail message. | |
35 * | |
36 * @param message | |
37 * the detail message; may be <code>null</code>. | |
38 */ | |
39 public this(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; may be <code>null</code>. | |
49 * @param cause | |
50 * the cause; may be <code>null</code>. | |
51 */ | |
52 public this(String message, Exception 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 */ | |
64 public Exception getCause() { | |
65 return cause; | |
66 } | |
67 | |
68 } |