You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Daniel Stoch <da...@gmail.com> on 2008/08/11 17:22:16 UTC

Handling runtime exceptions in ajax request

Hi,

In Wicket by default IRequestCycleProcessor.respond(RuntimeException,
RequestCycle) method is called to handle runtime exceptions. In
AbstractRequestCycleProcessor this method throws
RestartResponseException (or RestartResponseAtInterceptPageException)
and then the other page is shown (eg. ExceptionErrorPage or other page
specified in RequestCycle.onRuntimeException()).

In ajax requests I want to avoid loading another page when runtime
exception is thrown. I want to show a proper exception message within
the current page.
I have prepared a small draft solution how to do this (by extending
AjaxRequestTarget and WebRequestCycleProcessor classes), but firstly I
want to ask you is it any "standard" way to handle runtime exception
within ajax request, without rendering another page?

--
Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Handling runtime exceptions in ajax request

Posted by Alex Objelean <al...@isdc.ro>.
I'm interested in this subject too. Anyone?


Daniel Stoch-2 wrote:
> 
> Hi,
> 
> In Wicket by default IRequestCycleProcessor.respond(RuntimeException,
> RequestCycle) method is called to handle runtime exceptions. In
> AbstractRequestCycleProcessor this method throws
> RestartResponseException (or RestartResponseAtInterceptPageException)
> and then the other page is shown (eg. ExceptionErrorPage or other page
> specified in RequestCycle.onRuntimeException()).
> 
> In ajax requests I want to avoid loading another page when runtime
> exception is thrown. I want to show a proper exception message within
> the current page.
> I have prepared a small draft solution how to do this (by extending
> AjaxRequestTarget and WebRequestCycleProcessor classes), but firstly I
> want to ask you is it any "standard" way to handle runtime exception
> within ajax request, without rendering another page?
> 
> --
> Daniel
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Handling-runtime-exceptions-in-ajax-request-tp18927900p20289107.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org