01: package nl.knowlogy.validation;
02:
03: /**
04: * A ValidationException is a exception which contains
05: * validation messages.
06: *
07: * @author <a href="mailto:robert.hofstra@knowlogy.nl">Robert Hofstra, Knowlogy</a>
08: *
09: */
10: public class ValidationException extends RuntimeException {
11:
12: public static final long serialVersionUID = 0;
13:
14: private Messages messages;
15:
16: public ValidationException(Messages messages) {
17: this .messages = messages;
18: }
19:
20: public Messages getMessages() {
21: return messages;
22: }
23:
24: public String getMessage() {
25: return messages != null ? messages.toString() : null;
26: }
27:
28: }
|