You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Eelco Hillenius <ee...@gmail.com> on 2007/01/23 03:00:31 UTC

WebResponse#redirect(String)

Hi,

I'd like to get rid of the fact that WebResponse#redirect(String)
throws an exception when a redirect fails. That method is - like the
documentation states - only for internal use, and the code that
currently calls it never tries to catch the exception. I don't think
the exceptions add much there, and propose to just log a warning with
the exception instead:

log.warn("redirect to " + url + failed: " + e.getMessage(), e);

Is anyone against this change (for 1.3 and 2.0)?

Eelco

Re: WebResponse#redirect(String)

Posted by Johan Compagner <jc...@gmail.com>.
+1 i hate exceptions anyway. Dont want to see them anywhere.

johan


On 1/23/07, Igor Vaynberg <ig...@gmail.com> wrote:
>
> we are seeing this usually cause by socketclosedexception from nio, so its
> not like we can recover anyways
>
> +1 to just log it
>
> -igor
>
>
> On 1/22/07, Eelco Hillenius <ee...@gmail.com> wrote:
> >
> > Hi,
> >
> > I'd like to get rid of the fact that WebResponse#redirect(String)
> > throws an exception when a redirect fails. That method is - like the
> > documentation states - only for internal use, and the code that
> > currently calls it never tries to catch the exception. I don't think
> > the exceptions add much there, and propose to just log a warning with
> > the exception instead:
> >
> > log.warn("redirect to " + url + failed: " + e.getMessage(), e);
> >
> > Is anyone against this change (for 1.3 and 2.0)?
> >
> > Eelco
> >
>
>

Re: WebResponse#redirect(String)

Posted by Igor Vaynberg <ig...@gmail.com>.
we are seeing this usually cause by socketclosedexception from nio, so its
not like we can recover anyways

+1 to just log it

-igor


On 1/22/07, Eelco Hillenius <ee...@gmail.com> wrote:
>
> Hi,
>
> I'd like to get rid of the fact that WebResponse#redirect(String)
> throws an exception when a redirect fails. That method is - like the
> documentation states - only for internal use, and the code that
> currently calls it never tries to catch the exception. I don't think
> the exceptions add much there, and propose to just log a warning with
> the exception instead:
>
> log.warn("redirect to " + url + failed: " + e.getMessage(), e);
>
> Is anyone against this change (for 1.3 and 2.0)?
>
> Eelco
>