wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dipu Seminlal" <dipu....@googlemail.com>
Subject Re: IExceptionResponseStrategy gone from 1.3
Date Thu, 01 Nov 2007 16:42:57 GMT
Hi Igor,

Many thanks for the reply, so will that be correct if i do the following in
my application class

    /**
     * @see org.apache.wicket.Application#newRequestCycle(
org.apache.wicket.Request,
     *      org.apache.wicket.Response)
     */
    public RequestCycle newRequestCycle(final Request request, final
Response response)
    {
        return new WebRequestCycle(this, (WebRequest)request,
(WebResponse)response)
        {

            @Override
            public Page onRuntimeException(Page page, RuntimeException e)
            {
                // TODO Auto-generated method stub
                return new ErrorPage(e,page);
            }

        };
    }

or do you mean something else ??

Kind Regards
Dipu

On 11/1/07, Igor Vaynberg <igor.vaynberg@gmail.com> wrote:
>
> override requestcycle.onruntimeexception()
>
> -igor
>
>
> On 11/1/07, Dipu Seminlal <dipu.wkt@googlemail.com> wrote:
> > Hi all,
> >
> > I had a simple implementation of  IExceptionResponseStrategy which
> helped me
> > to  do this
> >
> > protected IRequestCycleProcessor newRequestCycleProcessor()
> >     {
> >         return new DefaultWebRequestCycleProcessor()
> >         {
> >             protected IExceptionResponseStrategy
> > newExceptionResponseStrategy()
> >             {
> >                 return new MyExceptionStrategy();
> >             }
> >         };
> >     }
> >
> > and throw new RestartResponseException(new MyErrorPage(e,page)); from
> > MyExceptionStrategy and log the exception in the error page.
> >
> > Now i am in the process of migrating my existing application which run
> on
> > 1.2.6 to 1.3 and i see IExceptionResponseStrategy has gone missing.
> >
> > I would like to pass on the exception to my error page and log it as i
> was
> > doing before.
> >
> > What is the best way to do it ?
> >
> > I can see that i can override public void respond(RuntimeException e,
> > RequestCycle requestCycle) and do it, is the right direction to take ?
> >
> >
> > Regards
> > Dipu
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message