Mercurial > projects > dwt2
comparison org.eclipse.equinox.common/src/org/eclipse/core/runtime/ISafeRunnable.d @ 105:bbe49769ec18
...
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 08 Nov 2009 12:42:30 +0100 |
parents | bc29606a740c |
children |
comparison
equal
deleted
inserted
replaced
104:88652073d1c2 | 105:bbe49769ec18 |
---|---|
2 * Copyright (c) 2000, 2006 IBM Corporation and others. | 2 * Copyright (c) 2000, 2006 IBM Corporation and others. |
3 * All rights reserved. This program and the accompanying materials | 3 * All rights reserved. This program and the accompanying materials |
4 * are made available under the terms of the Eclipse Public License v1.0 | 4 * are made available under the terms of the Eclipse Public License v1.0 |
5 * which accompanies this distribution, and is available at | 5 * which accompanies this distribution, and is available at |
6 * http://www.eclipse.org/legal/epl-v10.html | 6 * http://www.eclipse.org/legal/epl-v10.html |
7 * | 7 * |
8 * Contributors: | 8 * Contributors: |
9 * IBM Corporation - initial API and implementation | 9 * IBM Corporation - initial API and implementation |
10 * Port to the D programming language: | |
11 * Frank Benoit <benoit@tionex.de> | |
12 *******************************************************************************/ | 10 *******************************************************************************/ |
13 module org.eclipse.core.runtime.ISafeRunnable; | 11 // Port to the D programming language: |
12 // Frank Benoit <benoit@tionex.de> | |
13 module org.eclipse.core.runtimeISafeRunnable; | |
14 | 14 |
15 // import org.eclipse.swt.internal.Platform; | |
16 import java.lang.all; | 15 import java.lang.all; |
16 | |
17 | |
17 /** | 18 /** |
18 * Safe runnables represent blocks of code and associated exception | 19 * Safe runnables represent blocks of code and associated exception |
19 * handlers. They are typically used when a plug-in needs to call some | 20 * handlers. They are typically used when a plug-in needs to call some |
20 * untrusted code (e.g., code contributed by another plug-in via an | 21 * untrusted code (e.g., code contributed by another plug-in via an |
21 * extension). | 22 * extension). |
33 * particular usecase for this runnable. Generalized exception | 34 * particular usecase for this runnable. Generalized exception |
34 * processing (e.g., logging in the platform's log) is done by the | 35 * processing (e.g., logging in the platform's log) is done by the |
35 * Platform's run mechanism. | 36 * Platform's run mechanism. |
36 * | 37 * |
37 * @param exception an exception which occurred during processing | 38 * @param exception an exception which occurred during processing |
38 * the body of this runnable (i.e., in <code>run()</code>) | 39 * the body of this runnable (i.e., in <code>run()</code>) |
39 * @see SafeRunner#run(ISafeRunnable) | 40 * @see SafeRunner#run(ISafeRunnable) |
40 */ | 41 */ |
41 public void handleException(Exception exception); | 42 public void handleException(Throwable exception); |
42 | 43 |
43 /** | 44 /** |
44 * Runs this runnable. Any exceptions thrown from this method will | 45 * Runs this runnable. Any exceptions thrown from this method will |
45 * be passed to this runnable's <code>handleException</code> | 46 * be passed to this runnable's <code>handleException</code> |
46 * method. | 47 * method. |
47 * | 48 * |
48 * @exception Exception if a problem occurred while running this method. | 49 * @exception Exception if a problem occurred while running this method. |
49 * The exception will be processed by <code>handleException</code> | 50 * The exception will be processed by <code>handleException</code> |
50 * @see SafeRunner#run(ISafeRunnable) | 51 * @see SafeRunner#run(ISafeRunnable) |
51 */ | 52 */ |
52 public void run(); | 53 public void run() ; |
53 } | 54 } |