1 56 package org.objectstyle.cayenne.validation; 57 58 import org.objectstyle.cayenne.CayenneRuntimeException; 59 60 66 public class ValidationException extends CayenneRuntimeException { 67 68 private ValidationResult result; 69 70 public ValidationException(String message) { 71 super(message); 72 } 73 74 public ValidationException(ValidationResult result) { 75 this("Validation has failed.", result); 76 } 77 78 public ValidationException(String message, ValidationResult result) { 79 super(message); 80 this.result = result; 81 } 82 83 public ValidationResult getValidationResult() { 84 return result; 85 } 86 87 public String toString() { 88 return super.toString() + System.getProperty("line.separator") + this.result; 89 } 90 } | Popular Tags |