Guten Tag Martin Grigorov,
am Dienstag, 3. Mai 2016 um 14:31 schrieben Sie:

> Because the DefaultExceptionMapper is the final/catch-all place to catch
> exceptions and it should be generic.

Subclasses can't easily override this specific behavior as well and a
more useful default behavior is generic.

> Most of the time end users should not see what exactly broke in the
> application. A generic "An error occurred" should be enough.

Yeah, that's why the web is full of jokes and anger about no helpful
error messages like that one. ;-)

Your argument doesn't even hold for your own codebase, like can be
seen in ServletWebRequest. In fact, it's the other way around: It is
easy to not provide detailed information to my users if I/they don't
want to, but it's unnecessary hard currently to do so if I/they want
to know more.

That's especially true for Ajax like in this case: Those errors are
already either handled specially by the client software or simply
ignored by the browser. So there's exactly no user out there getting
to much unwanted information.

> You could use custom IRequestCycleListener#onException() if you want
> special behavior.

I would prefer providing a patch making default Wicket implementations
more useful for most devs and code base more consistent. ;-) You
already have everything needed where it's needed and things could even
be made configurable using some kind of INVOKE_FAILURE_HANDLER_WITH_MSG
or a protected callback which creates the object to return with the
current behavior as default implementation. I already have a subclass
of DefaultExceptionMapper, it's only that I don't want to double so
many code...

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