Clover coverage report - QedeqKernelSe Coverage Report
Coverage timestamp: Do Dez 29 2005 18:38:29 CET
file stats: LOC: 76   Methods: 4
NCLOC: 24   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
SaxErrorHandler.java - 42,9% 25% 36,4%
coverage coverage
 1    /* $Id: SaxErrorHandler.java,v 1.9 2005/10/17 17:14:02 m31 Exp $
 2    *
 3    * This file is part of the project "Hilbert II" - http://www.qedeq.org
 4    *
 5    * Copyright 2000-2005, Michael Meyling <mime@qedeq.org>.
 6    *
 7    * "Hilbert II" is free software; you can redistribute
 8    * it and/or modify it under the terms of the GNU General Public
 9    * License as published by the Free Software Foundation; either
 10    * version 2 of the License, or (at your option) any later version.
 11    *
 12    * This program is distributed in the hope that it will be useful,
 13    * but WITHOUT ANY WARRANTY; without even the implied warranty of
 14    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 15    * GNU General Public License for more details.
 16    */
 17   
 18    package org.qedeq.kernel.xml.parser;
 19   
 20    import java.io.File;
 21   
 22    import org.xml.sax.ErrorHandler;
 23    import org.xml.sax.SAXException;
 24    import org.xml.sax.SAXParseException;
 25   
 26   
 27    /**
 28    * Error handler for XML parsing.
 29    *
 30    * @version $Revision: 1.9 $
 31    * @author Michael Meyling
 32    */
 33    public final class SaxErrorHandler implements ErrorHandler {
 34   
 35    /** File that is parsed. */
 36    private final File file;
 37   
 38    /** Collects errors. */
 39    private final ExceptionList list;
 40   
 41    /**
 42    * Constructor.
 43    *
 44    * @param file File that is parsed.
 45    * @param list Collector for the SAX exceptions.
 46    */
 47  34 public SaxErrorHandler(final File file, final ExceptionList list) {
 48  34 super();
 49  34 this.file = file;
 50  34 this.list = list;
 51    }
 52   
 53   
 54    /* (non-Javadoc)
 55    * @see org.xml.sax.ErrorHandler#warning(org.xml.sax.SAXParseException)
 56    */
 57  0 public final void warning(final SAXParseException e) throws SAXException {
 58  0 list.add(new SyntaxException(e, file));
 59    }
 60   
 61    /* (non-Javadoc)
 62    * @see org.xml.sax.ErrorHandler#error(org.xml.sax.SAXParseException)
 63    */
 64  0 public final void error(final SAXParseException e) throws SAXException {
 65  0 list.add(new SyntaxException(e, file));
 66    }
 67   
 68    /* (non-Javadoc)
 69    * @see org.xml.sax.ErrorHandler#fatalError(org.xml.sax.SAXParseException)
 70    */
 71  0 public final void fatalError(final SAXParseException e) throws SAXException {
 72  0 list.add(new SyntaxException(e, file));
 73  0 throw e;
 74    }
 75   
 76    }