Clover coverage report -
Coverage timestamp: Sat Jul 7 2007 16:41:13 CEST
file stats: LOC: 60   Methods: 4
NCLOC: 22   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
JtrSaxErrorHandler.java - 14.3% 25% 18.2%
coverage coverage
 1    /**
 2    * JTRunner is free software; you can redistribute it and/or modify it under the
 3    * terms of the GNU General Public License as published by the Free Software
 4    * Foundation; either version 2, or (at your option) any later version.
 5    */
 6   
 7    package jtr.config;
 8   
 9    import org.apache.log4j.Logger;
 10    import org.xml.sax.ErrorHandler;
 11    import org.xml.sax.SAXException;
 12    import org.xml.sax.SAXParseException;
 13   
 14    /**
 15    * This is the JTR custom handler for SAX exceptions generated while
 16    * deserializing the content of the <code>jtr.xml</code> configuration
 17    * file at startup.
 18    *
 19    * @author Francesco Russo (frusso@dev.java.net)
 20    * @version 4.0
 21    * @since 3.0
 22    */
 23    public class JtrSaxErrorHandler implements ErrorHandler {
 24   
 25    /**
 26    * Default constructor.
 27    */
 28  1 public JtrSaxErrorHandler() {
 29  1 super();
 30    }
 31   
 32    /**
 33    * @see org.xml.sax.ErrorHandler#warning(org.xml.sax.SAXParseException)
 34    */
 35  0 public void warning(SAXParseException exception) throws SAXException {
 36    // TODO Auto-generated method stub
 37  0 logger.warn("Caught a SAXParserException: ", exception);
 38  0 throw exception;
 39    }
 40   
 41    /**
 42    * @see org.xml.sax.ErrorHandler#error(org.xml.sax.SAXParseException)
 43    */
 44  0 public void error(SAXParseException exception) throws SAXException {
 45    // TODO Auto-generated method stub
 46  0 logger.error("Caught a SAXParserException: ", exception);
 47  0 throw exception;
 48    }
 49   
 50    /**
 51    * @see org.xml.sax.ErrorHandler#fatalError(org.xml.sax.SAXParseException)
 52    */
 53  0 public void fatalError(SAXParseException exception) throws SAXException {
 54    // TODO Auto-generated method stub
 55  0 logger.fatal("Caught a SAXParserException: ", exception);
 56  0 throw exception;
 57    }
 58   
 59    protected static final Logger logger = Logger.getLogger(JtrSaxErrorHandler.class);
 60    }