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

Better exception message when Page instantiation fails in DefaultPageFactory

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.8.0
    • Fix Version/s: 6.9.0, 7.0.0-M1
    • Component/s: wicket
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: