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 |
dl |
1.4 |
* that aborted by throwing an exception. This exception can be |
12 |
|
|
* inspected using the {@link #getCause()} method. |
13 |
tim |
1.1 |
* |
14 |
|
|
* @since 1.5 |
15 |
|
|
* @see Future |
16 |
|
|
* |
17 |
|
|
* @spec JSR-166 |
18 |
dl |
1.5 |
* @revised $Date: 2003/08/24 14:47:31 $ |
19 |
dl |
1.3 |
* @editor $Author: dl $ |
20 |
|
|
* @author Doug Lea |
21 |
tim |
1.1 |
*/ |
22 |
|
|
public class ExecutionException extends Exception { |
23 |
dl |
1.5 |
private static final long serialVersionUID = 7830266012832686185L; |
24 |
tim |
1.1 |
|
25 |
|
|
/** |
26 |
|
|
* Constructs a <tt>ExecutionException</tt> with no detail message. |
27 |
|
|
* The cause is not initialized, and may subsequently be |
28 |
|
|
* initialized by a call to {@link #initCause(Throwable) initCause}. |
29 |
|
|
*/ |
30 |
|
|
protected ExecutionException() { } |
31 |
|
|
|
32 |
|
|
/** |
33 |
|
|
* Constructs a <tt>ExecutionException</tt> with the specified detail |
34 |
|
|
* message. The cause is not initialized, and may subsequently be |
35 |
|
|
* initialized by a call to {@link #initCause(Throwable) initCause}. |
36 |
|
|
* |
37 |
|
|
* @param message the detail message |
38 |
|
|
*/ |
39 |
|
|
protected ExecutionException(String message) { |
40 |
|
|
super(message); |
41 |
|
|
} |
42 |
|
|
|
43 |
|
|
/** |
44 |
|
|
* Constructs a <tt>ExecutionException</tt> with the specified detail |
45 |
|
|
* message and cause. |
46 |
|
|
* |
47 |
|
|
* @param message the detail message |
48 |
|
|
* @param cause the cause (which is saved for later retrieval by the |
49 |
|
|
* {@link #getCause()} method) |
50 |
|
|
*/ |
51 |
|
|
public ExecutionException(String message, Throwable cause) { |
52 |
|
|
super(message, cause); |
53 |
|
|
} |
54 |
|
|
|
55 |
|
|
/** |
56 |
|
|
* Constructs a <tt>ExecutionException</tt> with the specified cause. |
57 |
|
|
* The detail message is set to: |
58 |
|
|
* <pre> |
59 |
|
|
* (cause == null ? null : cause.toString())</pre> |
60 |
|
|
* (which typically contains the class and detail message of |
61 |
|
|
* <tt>cause</tt>). |
62 |
|
|
* |
63 |
|
|
* @param cause the cause (which is saved for later retrieval by the |
64 |
|
|
* {@link #getCause()} method) |
65 |
|
|
*/ |
66 |
|
|
public ExecutionException(Throwable cause) { |
67 |
|
|
super(cause); |
68 |
|
|
} |
69 |
|
|
} |