Is there an instance of the Default "Internal Error" page or should I
return null in te onRuntimeException method?
...
return new MyExceptionPage(e); 

Replace with

 return new org.apache.wicket.page.InternalErrorPage(e);

-----Original Message-----
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Tuesday, November 23, 2010 9:28 AM
To: users@wicket.apache.org
Subject: Re: Log last error on error page

On Tue, Nov 23, 2010 at 3:18 PM, Brown, Berlin [GCG-PFS] <
berlin.br...@primerica.com> wrote:

> Another question, how do I throw the default error page?
>
what does it mean to throw a page ?

>
> So with that request, log the exception:
>
> public final class MyRequestCycle extends WebRequestCycle {
>        public WebRequestCycle(final WebApplication application, final 
> WebRequest request, final Response response) {
>                super(application, request, response);
>        }
>
>        /**
>         * {...@inheritdoc}
>         */
>        @Override
>        protected final Page onRuntimeException(final Page cause, final

> RuntimeException e) {
>
>                // And then catch the exception
>                LOG.error(e);
>                return new MyExceptionPage(e);
>         }
> }
>
> -----Original Message-----
> From: Martin Grigorov [mailto:mgrigo...@apache.org]
> Sent: Tuesday, November 23, 2010 9:05 AM
> To: users@wicket.apache.org
> Subject: Re: Log last error on error page
>
> The easiest I can think of is to override 
> org.apache.wicket.RequestCycle.onRuntimeException(Page,
> RuntimeException) and return your own page which will show the error
>
> On Tue, Nov 23, 2010 at 2:43 PM, Brown, Berlin [GCG-PFS] < 
> berlin.br...@primerica.com> wrote:
>
> > Is there a way to log the last error when you reach an error page.
> >
> > I am using my own error page but also want to log the last stack 
> > trace
>
> > or exception message that created the error.
> > getApplicationSettings().setInternalErrorPage(ErrorPage.class);
> >
> >
> > Berlin Brown
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


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

Reply via email to