Uploaded image for project: 'Commons Validator'
  1. Commons Validator
  2. VALIDATOR-181

[validator] More informative Exception message

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Nightly Builds
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    • 27471

    Description

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            adam.hardy@cyberspaceroad.com Adam Hardy
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: