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 URL| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
AbstractExceptionAwareLogic() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getErrorUrl() |
protected R |
handleException(java.lang.Exception e,
HttpActionAdapter<R,C> httpActionAdapter,
C context)
Handle exceptions.
|
protected java.lang.RuntimeException |
runtimeException(java.lang.Exception exception)
Wrap an Exception into a RuntimeException.
|
void |
setErrorUrl(java.lang.String errorUrl)
Define on which error URL the user will be redirected in case of an exception.
|
getProfileManager, getProfileManagerFactory, setProfileManagerFactoryprotected R handleException(java.lang.Exception e, HttpActionAdapter<R,C> httpActionAdapter, C context)
e - the thrown exceptionhttpActionAdapter - the HTTP action adaptercontext - the web contextprotected java.lang.RuntimeException runtimeException(java.lang.Exception exception)
exception - the original exceptionpublic java.lang.String getErrorUrl()
public void setErrorUrl(java.lang.String errorUrl)
errorUrl - the error URLCopyright © 2019. All Rights Reserved.