KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > util > concurrent > ExecutionException


1 /*
2  * @(#)ExecutionException.java 1.3 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package java.util.concurrent;
9
10 /**
11  * Exception thrown when attempting to retrieve the result of a task
12  * that aborted by throwing an exception. This exception can be
13  * inspected using the {@link #getCause()} method.
14  *
15  * @see Future
16  * @since 1.5
17  * @author Doug Lea
18  */

19 public class ExecutionException extends Exception JavaDoc {
20     private static final long serialVersionUID = 7830266012832686185L;
21
22     /**
23      * Constructs a <tt>ExecutionException</tt> with no detail message.
24      * The cause is not initialized, and may subsequently be
25      * initialized by a call to {@link #initCause(Throwable) initCause}.
26      */

27     protected ExecutionException() { }
28
29     /**
30      * Constructs a <tt>ExecutionException</tt> with the specified detail
31      * message. The cause is not initialized, and may subsequently be
32      * initialized by a call to {@link #initCause(Throwable) initCause}.
33      *
34      * @param message the detail message
35      */

36     protected ExecutionException(String JavaDoc message) {
37         super(message);
38     }
39
40     /**
41      * Constructs a <tt>ExecutionException</tt> with the specified detail
42      * message and cause.
43      *
44      * @param message the detail message
45      * @param cause the cause (which is saved for later retrieval by the
46      * {@link #getCause()} method)
47      */

48     public ExecutionException(String JavaDoc message, Throwable JavaDoc cause) {
49         super(message, cause);
50     }
51
52     /**
53      * Constructs a <tt>ExecutionException</tt> with the specified cause.
54      * The detail message is set to:
55      * <pre>
56      * (cause == null ? null : cause.toString())</pre>
57      * (which typically contains the class and detail message of
58      * <tt>cause</tt>).
59      *
60      * @param cause the cause (which is saved for later retrieval by the
61      * {@link #getCause()} method)
62      */

63     public ExecutionException(Throwable JavaDoc cause) {
64         super(cause);
65     }
66 }
67
Popular Tags