Bugs item #1458087, was opened at 2006-03-25 08:45
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1458087&group_id=119783

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: 1.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Ingram Chen (ingramchen)
Assigned to: Nobody/Anonymous (nobody)
Summary: Unable deal with specific runtime exception

Initial Comment:
  I want to catch a specific RuntimeException and then
redirect to a special
error page (not global one), I try to do this:


    @Override
    protected IRequestCycleFactory
getDefaultRequestCycleFactory() {
        return new IRequestCycleFactory() {
            private static final long serialVersionUID
= 1L;

            public RequestCycle newRequestCycle(Session
session,
                    Request request, Response response) {
                // Respond to request
                return new WebRequestCycle((WebSession)
session,
                        (WebRequest) request,
(WebResponse) response) {

                    @Override
                    public Page onRuntimeException(Page
page, RuntimeException e) {
                        if (e instanceof
MyRuntimeException) {
                            return new
MySpecificErrorPage();
                        } else {
                            return
super.onRuntimeException(page, e);
                        }
                    }
                };
            }
        };
    }

But I got internal error page.

Attachement is a small test that modified from
wicket-examples/Echo

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1458087&group_id=119783


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to