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

Provide helpful exception message in RequestCycle#urlFor()

    XMLWordPrintableJSON

Details

    Description

      When something goes wrong while trying to get the URL for pageClass/pageParameters using RequestCycle, the exception message and its stacktrace is not very helpful in tracking down the component actually causing the problem. (See attached stacktrace that I while rendering a BookmarkablePageLink with a null parameter.)

      I suggest to catch any exceptions thrown by urlFor(IRequestHandler) and throwing a WicketRuntimeException having pageClass and pageparamters in its message. (See attached patch)

      Attachments

        1. RequestCycle-urlFor-exception.patch
          2 kB
          Peter Parson
        2. urlFor-stacktrace.txt
          17 kB
          Peter Parson

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            pparson Peter Parson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: