code: protected
    void parseErrorHandler(Element element, Appender appender) {
      ErrorHandler eh = (ErrorHandler) OptionConverter.instantiateByClassName(
                                         subst(element.getAttribute(CLASS_ATTR)),
                                         org.apache.log4j.spi.ErrorHandler.class, 
   				       null);
      
      if(eh != null) {
        eh.setAppender(appender);
  
        PropertySetter propSetter = new PropertySetter(eh);
        NodeList children = element.getChildNodes();
        final int length 	= children.getLength();
  
        for (int loop = 0; loop < length; loop++) {
  	Node currentNode = children.item(loop);
  	if (currentNode.getNodeType() == Node.ELEMENT_NODE) {
  	  Element currentElement = (Element) currentNode;
  	  String tagName = currentElement.getTagName();
  	  if(tagName.equals(PARAM_TAG)) {
              setParameter(currentElement, propSetter);
  	  } else if(tagName.equals(APPENDER_REF_TAG)) {
  	    eh.setBackupAppender(findAppenderByReference(currentElement));
  	  } else if(tagName.equals(LOGGER_REF)) {
  	    String loggerName = currentElement.getAttribute(REF_ATTR);	    
  	    Logger logger = (catFactory == null) ? repository.getLogger(loggerName)
                  : repository.getLogger(loggerName, catFactory);
  	    eh.setLogger(logger);
  	  } else if(tagName.equals(ROOT_REF)) {
  	    Logger root = repository.getRootLogger();
  	    eh.setLogger(root);
  	  } else {
            quietParseUnrecognizedElement(eh, currentElement, props);
        }
  	}
        }
        propSetter.activate();
        appender.setErrorHandler(eh);
      }
    }
docs: Used internally to parse an {@link ErrorHandler} element.