/**
 *
 */
package org.ajax4jsf.portlet;

import org.ajax4jsf.portlet.application.PortletViewState;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.w3c.dom.Node;
import org.xml.sax.SAXException;


import javax.faces.context.FacesContext;
import javax.faces.context.FacesContextFactory;
import javax.portlet.faces.BridgeException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathFactory;
import javax.xml.xpath.XPathExpressionException;
import java.io.IOException;
import java.io.InputStream;

/**
 * @author asmirnov
 * @author <a href="mailto:whales@redhat.com">Wesley Hales</a>
 */

public class ExceptionHandlerImpl implements ExceptionHandler
{
   protected static final Log log = LogFactory.getLog(ExceptionHandlerImpl.class);


   /* (non-Javadoc)
   * @see org.ajax4jsf.portlet.ExceptionHandler#processActionException(javax.faces.context.FacesContext, org.ajax4jsf.portlet.application.PortletViewState, java.lang.Exception)
   */
   public void processActionException(FacesContext context,
                                      PortletViewState windowState, Exception e) throws BridgeException
   {
      throw new BridgeException("Error processing action lifecycle", e);

   }

   /* (non-Javadoc)
    * @see org.ajax4jsf.portlet.ExceptionHandler#processRenderException(javax.faces.context.FacesContext, org.ajax4jsf.portlet.application.PortletViewState, java.lang.Exception)
    */
   public void processRenderException(FacesContext context,
                                      PortletViewState windowState, Exception e) throws BridgeException
   {
      throw new BridgeException("Error processing render lifecycle", e);
   }

}
