the first possibility that comes to my mind is overriding the following
method in your application:

        @Override
        protected IRequestCycleProcessor newRequestCycleProcessor() {
                return new WebRequestCycleProcessor() {

                        @Override
                        protected Page onRuntimeException(final Page page, 
final RuntimeException
e) {
                                // do the default handling on 
pageexpiredexceptions
                                if (e instanceof PageExpiredException || e 
instanceof
AuthorizationException) {
                                        return null;
                                }
                                return new InternalServerError(page, e); //  
e.getCause for your NPE
                        }

                };
        }

egolan74 wrote:
> 
> Hi,
> In deployment, we set our own internal error page:
> getApplicationSettings().setInternalErrorPage(InternalErrorPage.class);
> and
> getExceptionSettings().setUnexpectedExceptionDisplay(
>                     IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE);
> 
> Is there a quick way to get the type of the exception and show a different
> message in our internal error page accordingly?
> For example: if we get NullPointerException, show a message: "You
> developer
> coded null !!! .
> And ArrayIndexOutOfBoundException will show: "oops.. the array is too
> small"
> .
> 
> Thanks
> 
> Eyal Golan
> [EMAIL PROTECTED]
> 
> Visit: http://jvdrums.sourceforge.net/
> LinkedIn: http://www.linkedin.com/in/egolan74
> 
> P  Save a tree. Please don't print this e-mail unless it's really
> necessary
> 
> 
> -----
> Eyal Golan
> [EMAIL PROTECTED]
> 
> Visit: JVDrums 
> LinkedIn: LinkedIn 
> 


-----
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/Hand-on-session-code-tp20719154p20719327.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]

Reply via email to