1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package net.sf.composite.validate;
17
18 import net.sf.composite.CompositeException;
19 import net.sf.composite.util.ObjectUtils;
20
21 /***
22 * Indicates that a composite could not be validated for some reason.
23 *
24 * @author Matt Sgarlata
25 * @since Mar 11, 2005
26 */
27 public class ComponentValidationException extends CompositeException {
28
29 public ComponentValidationException() {
30 super();
31 }
32 public ComponentValidationException(String message) {
33 super(message);
34 }
35 public ComponentValidationException(String message, Throwable cause) {
36 super(message, cause);
37 }
38 public ComponentValidationException(Throwable cause) {
39 super(cause);
40 }
41
42 public ComponentValidationException(Object composite, String reason) {
43 super("The composite " + ObjectUtils.getObjectDescription(composite) + " is invalid because " + reason);
44 }
45 }