Hi,

On Tue, May 3, 2016 at 2:22 PM, Thorsten Schöning <tschoen...@am-soft.de>
wrote:

> Hi all,
>
> > private IRequestHandler internalMap(Exception e)
> [...]
> >    switch
> (application.getExceptionSettings().getAjaxErrorHandlingStrategy())
> >    {
> >        case INVOKE_FAILURE_HANDLER :
> >            return new ErrorCodeRequestHandler(500);
> >    }
>
> Is there any reason why the request handler doesn't get any message
> retrieved from the available exception? The exception message may span
>

Because the DefaultExceptionMapper is the final/catch-all place to catch
exceptions and it should be generic.
Most of the time end users should not see what exactly broke in the
application. A generic "An error occurred" should be enough. The exception
is logged in the server logs for the application developers.
You could use custom IRequestCycleListener#onException() if you want
special behavior.


> multiple lines and such of course, but such things could be filtered.
> Currently only getting 500 without any hint to what's actually wrong
> looks a bit wasteful.
>
> Especially if I see lines like the following in ServletWebRequest:
>
> > throw new
> AbortWithHttpErrorCodeException(HttpServletResponse.SC_BAD_REQUEST,
> >     "Current ajax request is missing the base url header or parameter");
>
> So you already have places where you end with custom messages.
>
> Is this something worth filing as an enhancement in JIRA?
>
> Mit freundlichen Grüßen,
>
> Thorsten Schöning
>
> --
> Thorsten Schöning       E-Mail: thorsten.schoen...@am-soft.de
> AM-SoFT IT-Systeme      http://www.AM-SoFT.de/
>
> Telefon...........05151-  9468- 55
> Fax...............05151-  9468- 88
> Mobil..............0178-8 9468- 04
>
> AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
> AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to