1 22 23 package net.sourceforge.cobertura.reporting; 24 25 import junit.framework.Assert; 26 27 import org.xml.sax.ErrorHandler ; 28 import org.xml.sax.SAXParseException ; 29 30 38 public class JUnitXMLParserErrorHandler implements ErrorHandler 39 { 40 41 private void createErrorMessage(SAXParseException exception) 42 { 43 Assert.fail("Line number: " + exception.getLineNumber() 44 + " column: " + exception.getColumnNumber() 45 + "\n" 46 + exception.toString()); 47 } 48 49 public void error(SAXParseException exception) 50 { 51 createErrorMessage(exception); 52 } 53 54 public void fatalError(SAXParseException exception) 55 { 56 createErrorMessage(exception); 57 } 58 59 public void warning(SAXParseException exception) 60 { 61 createErrorMessage(exception); 62 } 63 64 } | Popular Tags |