just return null and the default logic will be applied depending on your IExceptionSettings
On Tue, Nov 23, 2010 at 3:31 PM, Brown, Berlin [GCG-PFS] < [email protected]> wrote: > 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:[email protected]] > Sent: Tuesday, November 23, 2010 9:28 AM > To: [email protected] > Subject: Re: Log last error on error page > > On Tue, Nov 23, 2010 at 3:18 PM, Brown, Berlin [GCG-PFS] < > [email protected]> 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:[email protected]] > > Sent: Tuesday, November 23, 2010 9:05 AM > > To: [email protected] > > 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] < > > [email protected]> 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: [email protected] > > For additional commands, e-mail: [email protected] > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
