1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package net.sf.collections15;
17
18 /***
19 * The <code>BufferOverflowException</code> is used when the buffer's capacity
20 * has been exceeded.
21 *
22 * @since Commons Collections 2.1
23 * @version $Revision: 1.1 $ $Date: 2005/03/19 07:13:35 $
24 *
25 * @author Avalon
26 * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
27 * @author <a href="mailto:jefft@apache.org">Jeff Turner</a>
28 * @author Paul Jack
29 * @author Stephen Colebourne
30 */
31 public class BufferOverflowException extends RuntimeException {
32
33 /*** The root cause throwable */
34 private final Throwable throwable;
35
36 /***
37 * Constructs a new <code>BufferOverflowException</code>.
38 */
39 public BufferOverflowException() {
40 super();
41 throwable = null;
42 }
43
44 /***
45 * Construct a new <code>BufferOverflowException</code>.
46 *
47 * @param message the detail message for this exception
48 */
49 public BufferOverflowException(String message) {
50 this(message, null);
51 }
52
53 /***
54 * Construct a new <code>BufferOverflowException</code>.
55 *
56 * @param message the detail message for this exception
57 * @param exception the root cause of the exception
58 */
59 public BufferOverflowException(String message, Throwable exception) {
60 super(message);
61 throwable = exception;
62 }
63
64 /***
65 * Gets the root cause of the exception.
66 *
67 * @return the root cause
68 */
69 public final Throwable getCause() {
70 return throwable;
71 }
72
73 }