@Override
public final Page onRuntimeException(final Page cause, final
RuntimeException e) {
Throwable t=e;
while (t!=null) {
if (t instanceof pageexpiredexception) { return
super.onRuntimeException(cause, e); }
t=t.getcause();
}
return new ErrorPage(e);
}
-igor
On Mon, Nov 23, 2009 at 11:29 AM, Anthony DePalma <[email protected]> wrote:
> A while back I posted that I was having problems with what I thought
> was the CryptedUrlWebRequestCodingStrategy. I've learn since that my
> custom error handling was the problem, so I wanted to take a step back
> and ask how I should be doing this.
>
> I have a requirement that on an internal error (besides a session
> expired exception), users are redirected to an error page with a form
> allowing them to submit some information. Unfortunately, I need to
> save the error as well, so the easy way of using
> getApplicationSettings().setInternalErrorPage(ErrorPage.class) is not
> sufficient because I have no reference to the error in hand.
>
> My error page takes an exception as a constructor argument, so what
> should I do to allow the exception to be sent for regular errors, but
> ignored for PageExpiredExceptions? Should I still be looking at a
> custom request cycle?
>
> PS, previously my request cycle (which killed my expired page) looked like
> this:
>
> �...@override
> public final Page onRuntimeException(final Page cause, final
> RuntimeException e) {
> return new ErrorPage(e);
> }
>
> I tried to check the instance of e for PageExpiredException and return
> that page, but that seemed to cause an infinite loop.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]