While tracing through the validation code trying to find why an XML won't validate I got to line 193 in org.exolab.castor.xml.FieldValidator.java which looks like this:
if ((value == null) && (_descriptor.isRequired())) {
String err = _descriptor.getXMLName();
err += " is a required field.";
throw new ValidationException(err);
}This is the place which blew up on my XML. The error message that is being generated at this points looks like this:
"-error-if-this-is-used- is a required field."
However...looking at the fields in _descriptor what would have really helped me is to have constructed the error using _descriptor.getFieldName() which would have produced this error:
" personName is a required field."
This would have been much more helpful to me in my debugging if this would have been used.
Would it make since to make this change in the code?
Thanks, Brent
PS. My code base was from the CVS head from the 24th of Sept.
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
