Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-5215

Better exception message when Page instantiation fails in DefaultPageFactory

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 6.8.0
    • 6.9.0, 7.0.0-M1
    • wicket
    • None

    Description

      If injecting dependencies to a page fails in DefaultPageFactory.newPage, the exception message is a bit misleading:

      "Can't instantiate page using constructor '...' and argument '...'. Might be it doesn't exist, may be it is not visible (public)."

      It could also mention the possibility of failing to inject the dependencies, which seems to be the case in many occasions.

      Even better, when calling the constructor fails, it could check the existence and visibility of the constructor instead of guessing what was the problem.

      Attachments

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            harmoniaa Edvard Fonsell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: