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

Make DefaultExceptionMapper extensible

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Implemented
    • 6.18.0, 7.0.0-M4
    • 7.0.0-M5, 6.19.0
    • wicket
    • None

    Description

      I'd like to send an email when wicket catches an unhandled exception. Also I want to customize the ExceptionErrorPage. Wicket offers getApplicationSettings().setInternalErrorPage(...) interface to set a custom internal error page. However, unlike the ExceptionErrorPage, InternalErrorPage does not receive the caught exception object or the current page object.

      In https://github.com/hannesd/wicket/commit/a33c6dff I extracted some code from DefaultExceptionMapper#internalMap into an extra method. Also I changed private to protected methods to make DefaultExceptionMapper reusable and extensible.

      I'd be nice if this patch or something similar enters wicket 6.x so that I don't have to duplicate 99% of DefaultExceptionMapper just to get my own version of ExceptionErrorPage.

      Attachments

        Issue Links

          Activity

            People

              bitstorm Andrea Del Bene
              hannesd Hannes Dohrn
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: