if you really want to display your own custom exception page, maybe it
should be overridable then... ?
Johan Compagner wrote:
yes i know that the SHOW_EXCEPTION_PAGE can't be overriden and it is
always the wicket exception page.
the only page you can specify youre self is the other one.
But with that one you won't get an exception to give you some more info.
johan
David Liebeherr wrote:
Johan Compagner wrote:
what job doesn't it do exactly?
Johnatan said i can extend ExceptionErrorPage and then set
SHOW_EXCEPTION_PAGE and my own ExceptionErrorPage will be show. This
does not work bc when SHOW_EXCEPTION_PAGE is set then the code always
uses the default ExceptionErrorPage.
Do you know what i mean?
Cu,
Dave
You can extend the error page. and use that as youre internal error
page.
But the problem is that you then don't get any Exception information.
I still do think we will need that.
The default wicket exception page can be what it is now.
And developers can provide there own and set SHOW_INTERNAL......
setting.
But then i personally still think that developers want to know the
exception..
Se we need it to give it to them
We can do that 2 ways.
1> Look up if the exception page has a Exception param constructor
2> Look if the exception page implements an interface.
johan
David Liebeherr wrote:
Jonathan Locke wrote:
i don't think we need this johan. i think you can just set the
unexpectedExceptionDisplay
to SHOW_EXCEPTION_PAGE and then extend ExceptionErrorPage instead
of InternalErrorPage. the idea here, although it's not
necessarily well spelled out in the
documentation is that you can have EITHER an exception page OR a
simpler page
that says "internal error" instead. the idea being that
developers will use the exception page
and end users can see the simple "an error occurred" kind of
page. make sense?
private final void redirectToExceptionErrorPage(final Page
page, final RuntimeException e) throws ServletException
{
// If application doesn't want debug info showing up for users
final ApplicationSettings settings =
application.getSettings();
if (settings.getUnexpectedExceptionDisplay() !=
ApplicationSettings.SHOW_NO_EXCEPTION_PAGE)
{
if (settings.getUnexpectedExceptionDisplay() ==
ApplicationSettings.SHOW_INTERNAL_ERROR_PAGE)
{
// Show internal error page
setResponsePage(session.getPageFactory(page).newPage(
application.getPages().getInternalErrorPage()));
}
else
{
// Show full details
setResponsePage(new ExceptionErrorPage(e,
getResponsePage()));
}
// We generally want to redirect the response because we
// were in the middle of rendering and the page may end up
// looking like spaghetti otherwise
redirectTo(getResponsePage());
}
}
So extending ExceptionErrorPage does not do the job, bc
redirectToExceptionErrorPage does not use the internalErrorPage-Class.
Cu,
Dave
oh, and i think the FIX for this endless loop is probably to add
this line of code
to the InternalErrorPage:
/**
* @see wicket.Page#isErrorPage()
*/
public boolean isErrorPage()
{
return true;
}
that's what prevents the exception error page from recursing. we
just forgot to
add it to the InternalErrorPage when we fixed that problem ages ago.
can you try adding this to your code David and see if that fixes
it? thanks!
jon
Johan Compagner wrote:
i think i will introduce an interface for the internal_error_page
that you can implement then i will call the method
setError(Throwable)
johan
Phil Kulak wrote:
This is an unrelated question, but how does the error page get
access
to the exception?
On 8/2/05, David Liebeherr <[EMAIL PROTECTED]> wrote:
Hi guys,
...
getPages().setInternalErrorPage(ErrorPage.class);
getSettings().setUnexpectedExceptionDisplay(ApplicationSettings.SHOW_INTERNAL_ERROR_PAGE);
...
strange question, but: What happens when an Error occours on the
ErrorPage it self? :-)
I have discovered this right now. And the result is an endless
loop... :-)
Can someone thake care of that?
Fill some bug report or something if it is realy a bug.
Or did i just something wrong?
Thanx,
Dave
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration
Strategies
from IBM. Find simple to follow Roadmaps, straightforward
articles,
informative Webcasts and more! Get everything you need to get
up to
speed, fast.
http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration
Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration
Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration
Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle
Practices
Agile & Plan-Driven Development * Managing Projects & Teams *
Testing & QA
Security * Process Improvement & Measurement *
http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle
Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing
& QA
Security * Process Improvement & Measurement *
http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle
Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing
& QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user