public abstract class AbstractExceptionAwareLogic<R,C extends WebContext> extends ProfileManagerFactoryAware<C>
Abstract logic to handle exceptions:
HttpAction
, the HTTP action (which has already been performed on the web context) is "adapted"errorUrl
is defined, the user is redirected to this error URLModifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger |
Constructor and Description |
---|
AbstractExceptionAwareLogic() |
Modifier and Type | Method and Description |
---|---|
String |
getErrorUrl() |
protected R |
handleException(Exception e,
HttpActionAdapter<R,C> httpActionAdapter,
C context)
Handle exceptions.
|
protected RuntimeException |
runtimeException(Exception exception)
Wrap an Exception into a RuntimeException.
|
void |
setErrorUrl(String errorUrl)
Define on which error URL the user will be redirected in case of an exception.
|
getProfileManager, getProfileManagerFactory, setProfileManagerFactory
protected R handleException(Exception e, HttpActionAdapter<R,C> httpActionAdapter, C context)
e
- the thrown exceptionhttpActionAdapter
- the HTTP action adaptercontext
- the web contextprotected RuntimeException runtimeException(Exception exception)
exception
- the original exceptionpublic String getErrorUrl()
public void setErrorUrl(String errorUrl)
errorUrl
- the error URLCopyright © 2019. All rights reserved.