public class DefaultExceptionMapper extends Object implements IExceptionMapper
application
configuration
Constructor and Description |
---|
DefaultExceptionMapper() |
Modifier and Type | Method and Description |
---|---|
protected RenderPageRequestHandler |
createPageRequestHandler(PageProvider pageProvider)
Creates a
RenderPageRequestHandler for the target page provided by pageProvider . |
protected Page |
extractCurrentPage() |
protected boolean |
isProcessingAjaxRequest() |
IRequestHandler |
map(Exception e) |
protected IRequestHandler |
mapExpectedExceptions(Exception e,
Application application)
Maps expected exceptions (i.e.
|
protected IRequestHandler |
mapUnexpectedExceptions(Exception e,
Application application)
Maps unexpected exceptions to their corresponding
IRequestHandler . |
public IRequestHandler map(Exception e)
map
in interface IExceptionMapper
IRequestHandler
for given exceptionprotected IRequestHandler mapExpectedExceptions(Exception e, Application application)
IRequestHandler
.e
- the current exceptionapplication
- the current application objectIRequestHandler
for the current exceptionprotected IRequestHandler mapUnexpectedExceptions(Exception e, Application application)
IRequestHandler
.e
- the current exceptionapplication
- the current application objectIRequestHandler
for the current exceptionprotected RenderPageRequestHandler createPageRequestHandler(PageProvider pageProvider)
RenderPageRequestHandler
for the target page provided by pageProvider
.
Uses RenderPageRequestHandler.RedirectPolicy#NEVER_REDIRECT
policy to preserve the original page's URL
for non-Ajax requests and RenderPageRequestHandler.RedirectPolicy#AUTO_REDIRECT
for AJAX requests.pageProvider
- the page provider for the target pageprotected boolean isProcessingAjaxRequest()
protected Page extractCurrentPage()
null
if it cannot
be extractedCopyright © 2006–2022 Apache Software Foundation. All rights reserved.