1 |
tim |
1.1 |
/* |
2 |
|
|
* @(#)CannotExecuteException.java |
3 |
|
|
*/ |
4 |
|
|
|
5 |
|
|
package java.util.concurrent; |
6 |
|
|
|
7 |
|
|
/** |
8 |
|
|
* Thrown by an <tt>Executor</tt> when a task cannot be accepted for execution. |
9 |
|
|
* |
10 |
|
|
* @since 1.5 |
11 |
|
|
* @see Executor#execute |
12 |
|
|
* |
13 |
|
|
* @spec JSR-166 |
14 |
jozart |
1.2 |
* @revised $Date: 2003/05/14 21:30:45 $ |
15 |
|
|
* @editor $Author: tim $ |
16 |
tim |
1.1 |
*/ |
17 |
|
|
public class CannotExecuteException extends RuntimeException { |
18 |
|
|
|
19 |
|
|
/** |
20 |
|
|
* Constructs a <tt>CannotExecuteException</tt> with no detail message. |
21 |
|
|
* The cause is not initialized, and may subsequently be |
22 |
|
|
* initialized by a call to {@link #initCause(Throwable) initCause}. |
23 |
|
|
*/ |
24 |
|
|
public CannotExecuteException() { } |
25 |
|
|
|
26 |
|
|
/** |
27 |
|
|
* Constructs a <tt>CannotExecuteException</tt> with the specified detail |
28 |
|
|
* message. The cause is not initialized, and may subsequently be |
29 |
|
|
* initialized by a call to {@link #initCause(Throwable) initCause}. |
30 |
|
|
* |
31 |
|
|
* @param message the detail message |
32 |
|
|
*/ |
33 |
|
|
public CannotExecuteException(String message) { |
34 |
|
|
super(message); |
35 |
|
|
} |
36 |
|
|
|
37 |
|
|
/** |
38 |
|
|
* Constructs a <tt>CannotExecuteException</tt> with the specified detail |
39 |
|
|
* message and cause. |
40 |
|
|
* |
41 |
|
|
* @param message the detail message |
42 |
|
|
* @param cause the cause (which is saved for later retrieval by the |
43 |
|
|
* {@link #getCause()} method) |
44 |
|
|
*/ |
45 |
|
|
public CannotExecuteException(String message, Throwable cause) { |
46 |
|
|
super(message, cause); |
47 |
|
|
} |
48 |
|
|
|
49 |
|
|
/** |
50 |
|
|
* Constructs a <tt>CannotExecuteException</tt> with the specified cause. |
51 |
|
|
* The detail message is set to: |
52 |
|
|
* <pre> |
53 |
|
|
* (cause == null ? null : cause.toString())</pre> |
54 |
|
|
* (which typically contains the class and detail message of |
55 |
|
|
* <tt>cause</tt>). |
56 |
|
|
* |
57 |
|
|
* @param cause the cause (which is saved for later retrieval by the |
58 |
|
|
* {@link #getCause()} method) |
59 |
|
|
*/ |
60 |
|
|
public CannotExecuteException(Throwable cause) { |
61 |
|
|
super(cause); |
62 |
|
|
} |
63 |
|
|
} |