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

Provide helpful exception message in RequestCycle#urlFor()

    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. urlFor-stacktrace.txt
          17 kB
          Peter Parson
        2. RequestCycle-urlFor-exception.patch
          2 kB
          Peter Parson

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: