1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.commons.betwixt.io;
17
18 /***
19 * <p>Thrown when bean evaluation finds a cycle reference.</p>
20 *
21 * <p>There are two possible behaviours that <code>Betwixt</code> adopts when
22 * a cycle in the object graph is encountered.
23 *
24 * <p>If <code>ID</code> attributes are being generated,
25 * then the recursion will stop and the <code>IDREF</code> attribute will be
26 * written.
27 * In this case, <em>no exception will be thrown</em>.</p>
28 *
29 * <p>If <code>ID</code> are <strong>not</strong> being generated,
30 * then this exception will be thrown.</p>
31 *
32 * @author <a href="mailto:rdonkin@apache.org">Robert Burrell Donkin</a>
33 * @version $Revision: 155402 $
34 */
35 public class CyclicReferenceException extends RuntimeException {
36
37 /*** Message used with empty constructor */
38 private static final String DEFAULT_MESSAGE
39 = "Bean graph contains a cyclic reference";
40
41 /*** Construct exception with default message.
42 */
43 public CyclicReferenceException() {
44 super(DEFAULT_MESSAGE);
45 }
46
47 /***
48 * Construct exception with message
49 *
50 * @param message the detailed message string
51 */
52 public CyclicReferenceException(String message) {
53 super(message);
54 }
55 }