use of javax.faces.context.ExceptionHandler in project deltaspike by apache.
the class MockedJsf2TestContainer method initFacesContext.
protected void initFacesContext() {
FacesContextFactory facesContextFactory = (FacesContextFactory) FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
this.facesContext = facesContextFactory.getFacesContext(this.servletContext, this.request, this.response, this.lifecycle);
((MockFacesContext) this.facesContext).setApplication(this.application);
ExceptionHandler exceptionHandler = ((ExceptionHandlerFactory) FactoryFinder.getFactory(FactoryFinder.EXCEPTION_HANDLER_FACTORY)).getExceptionHandler();
this.facesContext.setExceptionHandler(exceptionHandler);
((MockFacesContext) this.facesContext).setExternalContext(new MockExternalContext(this.servletContext, this.request, this.response));
}
use of javax.faces.context.ExceptionHandler in project deltaspike by apache.
the class DeltaSpikeFacesContextWrapper method getExceptionHandler.
@Override
public ExceptionHandler getExceptionHandler() {
lazyInit();
ExceptionHandler exceptionHandler = this.wrappedFacesContext.getExceptionHandler();
if (this.bridgeExceptionHandlerActivated) {
exceptionHandler = new BridgeExceptionHandlerWrapper(exceptionHandler, this.beanManager, this.bridgeExceptionQualifier);
}
if (this.defaultErrorViewExceptionHandlerActivated) {
exceptionHandler = new DefaultErrorViewAwareExceptionHandlerWrapper(exceptionHandler);
}
return exceptionHandler;
}
Aggregations