package org.hdiv.exception;
import javax.faces.context.ExceptionHandler;
import javax.faces.context.ExceptionHandlerFactory;
/**
* HDIV's ExceptionHandler factory. Creates HDIVExceptionHandler instances
* for processing exceptions generated by HDIV.
*
* @author Gotzon Illarramendi
*
*/
public class HDIVExceptionHandlerFactory extends ExceptionHandlerFactory {
/**
* Original ExceptionHandlerFactory
*/
private ExceptionHandlerFactory original;
/**
* Default constructor
*
* @param original
* original ExceptionHandlerFactory
*/
public HDIVExceptionHandlerFactory(ExceptionHandlerFactory original) {
this.original = original;
}
/*
* (non-Javadoc)
*
* @see javax.faces.context.ExceptionHandlerFactory#getExceptionHandler()
*/
public ExceptionHandler getExceptionHandler() {
ExceptionHandler exceptionHandler = this.original.getExceptionHandler();
HDIVExceptionHandler hdivExHandler = new HDIVExceptionHandler(exceptionHandler);
return hdivExHandler;
}
}