01: /*
02: File: BrokenBarrierException.java
03:
04: Originally written by Doug Lea and released into the public domain.
05: This may be used for any purposes whatsoever without acknowledgment.
06: Thanks for the assistance and support of Sun Microsystems Labs,
07: and everyone contributing, testing, and using this code.
08:
09: History:
10: Date Who What
11: 29Jun1998 dl Create public version
12: */
13:
14: package EDU.oswego.cs.dl.util.concurrent;
15:
16: /**
17: * Thrown by Barrier upon interruption of participant threads
18: **/
19:
20: public class BrokenBarrierException extends RuntimeException {
21:
22: /**
23: * The index that barrier would have returned upon
24: * normal return;
25: **/
26:
27: public final int index;
28:
29: /**
30: * Constructs a BrokenBarrierException with given index
31: **/
32: public BrokenBarrierException(int idx) {
33: index = idx;
34: }
35:
36: /**
37: * Constructs a BrokenBarrierException with the
38: * specified index and detail message.
39: */
40: public BrokenBarrierException(int idx, String message) {
41: super(message);
42: index = idx;
43: }
44: }
|