[ 
https://issues.apache.org/jira/browse/WICKET-2659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13058562#comment-13058562
 ] 

Martin Grigorov commented on WICKET-2659:
-----------------------------------------

I'm -1 for this approach.
All this is possible with 
org.apache.wicket.request.cycle.IRequestCycleListener.onException(RequestCycle, 
Exception). Here the user can return RenderPageRequestHandler(new 
PageProvider(new MyErrorPage(exception))).

Wicket currently shows an error page with the exception stack in DEV mode, and 
hides the stacktrace in PRODUCTION mode which is the sane default. Any other 
desired behavior can be accomplished with the approach above. It is very 
flexible. 

> Improve exception handling with dynamically instantiated ErrorExceptionPage
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-2659
>                 URL: https://issues.apache.org/jira/browse/WICKET-2659
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-core
>    Affects Versions: 1.4.5, 1.4.6, 1.5-M1
>            Reporter: Ilja Pavkovic
>         Attachments: WICKET-2659.patch
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> based on the discussion at 
> http://old.nabble.com/error-page-td26968559.html
> I introduced the concept of a dynamically instantiated errorpage. If one uses 
> a customized error page with
>                 
> getApplicationSettings().setInternalErrorPage(MyErrorPage.class);
>                 
> getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE);
> neither the exception nor the responsePage can be accessed. Analogous the 
> handling of Pages with PageParameters 
> the request cycle tries to find and use a constructor like
> public MyErrorPage(final Throwable throwable, final Page page) {
> ..
> }
> If this constructor is not found, wicket uses
> public MyErrorPage() {
> ...} 
> as fallback.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to