commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 27471] New: - a more informative Exception message
Date Fri, 05 Mar 2004 10:52:40 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27471>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27471

a more informative Exception message

           Summary: a more informative Exception message
           Product: Commons
           Version: 1.0 Alpha
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Validator
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: adam.hardy@cyberspaceroad.com


I'm looking at the source code of
/usr/java/jakarta-commons/validator/src/share/org/apache/commons/validator/ValidatorAction.java
because I couldn't work out what was wrong from the Exception I just got (OK,
maybe I'm being a bit slow too...)

This is the Exception msg:

org.apache.commons.validator.ValidatorException:
org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field, org.apache.struts.action.ActionErrors,
javax.servlet.http.HttpServletRequest)


and of course the crucial information that is missing: NoSuchMethodException

This is the code at line 629:

 catch (NoSuchMethodException e) {
            throw new ValidatorException(e.getMessage());
        }

but what it should say, ideally is:

 catch (NoSuchMethodException e) {
            throw new ValidatorException(e);
        }

And then I would know immediately what it was complaining about, since my powers
of deduction are not as great as Sherlock Holmes ;)

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message