Clover coverage report -
Coverage timestamp: Do Okt 21 2004 12:21:23 CEST
file stats: LOC: 82   Methods: 5
NCLOC: 32   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
ConfigErrorHandler.java 0% 0% 0% 0%
coverage
 1    /*
 2    * ConfigErrorHandler.java
 3    *
 4    * Created on 12. Dezember 2002, 22:18
 5    */
 6   
 7    package org.jconfig.utils;
 8   
 9    import java.io.PrintWriter;
 10   
 11    import org.xml.sax.ErrorHandler;
 12    import org.xml.sax.SAXException;
 13    import org.xml.sax.SAXParseException;
 14    //import org.xml.sax.helpers.*;
 15    //import org.w3c.dom.*;
 16    /**
 17    *
 18    * @author andreas
 19    */
 20    public class ConfigErrorHandler implements ErrorHandler {
 21   
 22    private PrintWriter out;
 23    /**
 24    * Constructor for the MyErrorHandler object
 25    *
 26    *@param out Description of the Parameter
 27    */
 28  0 public ConfigErrorHandler(PrintWriter out) {
 29  0 this.out = out;
 30    }
 31   
 32    /**
 33    * Returns a string describing parse exception details
 34    *
 35    *@param spe Description of the Parameter
 36    *@return The parseExceptionInfo value
 37    */
 38  0 private String getParseExceptionInfo(SAXParseException spe) {
 39  0 String systemId = spe.getSystemId();
 40  0 if (systemId == null) {
 41  0 systemId = "null";
 42    }
 43  0 String info = "URI=" + systemId +
 44    " Line=" + spe.getLineNumber() +
 45    ": " + spe.getMessage();
 46  0 return info;
 47    }
 48   
 49    /**
 50    * Description of the Method
 51    *
 52    *@param spe Description of the Parameter
 53    *@exception SAXException Description of the Exception
 54    */
 55  0 public void warning(SAXParseException spe) throws SAXException {
 56  0 out.println("Warning: " + getParseExceptionInfo(spe));
 57    }
 58   
 59    /**
 60    * Description of the Method
 61    *
 62    *@param spe Description of the Parameter
 63    *@exception SAXException Description of the Exception
 64    */
 65  0 public void error(SAXParseException spe) throws SAXException {
 66  0 String message = "Error: " + getParseExceptionInfo(spe);
 67  0 throw new SAXException(message);
 68    }
 69   
 70    /**
 71    * Description of the Method
 72    *
 73    *@param spe Description of the Parameter
 74    *@exception SAXException Description of the Exception
 75    */
 76  0 public void fatalError(SAXParseException spe) throws SAXException {
 77  0 String message = "Fatal Error: " + getParseExceptionInfo(spe);
 78  0 throw new SAXException(message);
 79    }
 80    }
 81   
 82