Author: hardy.ferentschik
Date: 2009-08-24 08:42:30 -0400 (Mon, 24 Aug 2009)
New Revision: 17401
Modified:
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/xml/XmlMappingParser.java
Log:
HV-210
Modified:
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/xml/XmlMappingParser.java
===================================================================
---
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/xml/XmlMappingParser.java 2009-08-24
11:53:38 UTC (rev 17400)
+++
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/xml/XmlMappingParser.java 2009-08-24
12:42:30 UTC (rev 17401)
@@ -396,7 +396,16 @@
annotationDescriptor.setValue( name, elementValue );
}
- A annotation = AnnotationFactory.create( annotationDescriptor );
+ A annotation;
+ try {
+ annotation = AnnotationFactory.create( annotationDescriptor );
+ }
+ catch ( RuntimeException e ) {
+ throw new ValidationException(
+ "Unable to create annotation for configured constraint: " +
e.getMessage(), e
+ );
+ }
+
ConstraintDescriptorImpl<A> constraintDescriptor = new
ConstraintDescriptorImpl<A>(
annotation, constraintHelper
);
Show replies by date