If you return null in onRuntimeException -> the stack trace will be shown. But if you will return a page instance, the application will redirect you to this page. For instance: [CODE] @Override public Page onRuntimeException(final Page page, final RuntimeException e) { //do something return new LoginPage(); } [/CODE]
The above example will redirect you to the LoginPage if any runtime exception occures. aditsu wrote: > > Ok, but how would that let me render the rest of the page? > > > Alex Objelean wrote: >> >> There are more threads about this issue... >> >> In order to catch all runtime exception, you have to override default >> RequestCycle (newRequestCycle method) in your application class and >> override onRuntimeException method. >> >> Example: >> [CODE] >> @Override >> public RequestCycle newRequestCycle(final Request request, final Response >> response) { >> return new WebRequestCycle(this, (WebRequest) request, (WebResponse) >> response) { >> @Override >> public Page onRuntimeException(final Page page, final >> RuntimeException e) { >> //do something >> return null; >> } >> } >> } >> [/CODE] >> >> >> Alex Objelean >> > > -- View this message in context: http://www.nabble.com/Handling-exceptions-during-render-tp20301737p20302777.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]