1 |
tim |
1.1 |
/* |
2 |
dl |
1.2 |
* Written by Doug Lea with assistance from members of JCP JSR-166 |
3 |
|
|
* Expert Group and released to the public domain. Use, modify, and |
4 |
|
|
* redistribute this code in any way without acknowledgement. |
5 |
tim |
1.1 |
*/ |
6 |
|
|
|
7 |
|
|
package java.util.concurrent; |
8 |
|
|
|
9 |
|
|
/** |
10 |
dl |
1.3 |
* Exception thrown when attempting to retrieve the result of a task |
11 |
|
|
* that aborted. |
12 |
tim |
1.1 |
* |
13 |
|
|
* @since 1.5 |
14 |
|
|
* @see Future |
15 |
|
|
* |
16 |
|
|
* @spec JSR-166 |
17 |
dl |
1.3 |
* @revised $Date: 2003/05/27 18:14:40 $ |
18 |
|
|
* @editor $Author: dl $ |
19 |
|
|
* @author Doug Lea |
20 |
tim |
1.1 |
*/ |
21 |
|
|
public class ExecutionException extends Exception { |
22 |
|
|
|
23 |
|
|
/** |
24 |
|
|
* Constructs a <tt>ExecutionException</tt> with no detail message. |
25 |
|
|
* The cause is not initialized, and may subsequently be |
26 |
|
|
* initialized by a call to {@link #initCause(Throwable) initCause}. |
27 |
|
|
*/ |
28 |
|
|
protected ExecutionException() { } |
29 |
|
|
|
30 |
|
|
/** |
31 |
|
|
* Constructs a <tt>ExecutionException</tt> with the specified detail |
32 |
|
|
* message. The cause is not initialized, and may subsequently be |
33 |
|
|
* initialized by a call to {@link #initCause(Throwable) initCause}. |
34 |
|
|
* |
35 |
|
|
* @param message the detail message |
36 |
|
|
*/ |
37 |
|
|
protected ExecutionException(String message) { |
38 |
|
|
super(message); |
39 |
|
|
} |
40 |
|
|
|
41 |
|
|
/** |
42 |
|
|
* Constructs a <tt>ExecutionException</tt> with the specified detail |
43 |
|
|
* message and cause. |
44 |
|
|
* |
45 |
|
|
* @param message the detail message |
46 |
|
|
* @param cause the cause (which is saved for later retrieval by the |
47 |
|
|
* {@link #getCause()} method) |
48 |
|
|
*/ |
49 |
|
|
public ExecutionException(String message, Throwable cause) { |
50 |
|
|
super(message, cause); |
51 |
|
|
} |
52 |
|
|
|
53 |
|
|
/** |
54 |
|
|
* Constructs a <tt>ExecutionException</tt> with the specified cause. |
55 |
|
|
* The detail message is set to: |
56 |
|
|
* <pre> |
57 |
|
|
* (cause == null ? null : cause.toString())</pre> |
58 |
|
|
* (which typically contains the class and detail message of |
59 |
|
|
* <tt>cause</tt>). |
60 |
|
|
* |
61 |
|
|
* @param cause the cause (which is saved for later retrieval by the |
62 |
|
|
* {@link #getCause()} method) |
63 |
|
|
*/ |
64 |
|
|
public ExecutionException(Throwable cause) { |
65 |
|
|
super(cause); |
66 |
|
|
} |
67 |
|
|
} |