Another question, how do I throw the default error 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