1 package oracle.toplink.essentials.internal.ejb.cmp3.xml.parser; 2 3 import org.xml.sax.ErrorHandler ; 4 import org.xml.sax.SAXException ; 5 import org.xml.sax.SAXParseException ; 6 7 public class XMLExceptionHandler implements ErrorHandler { 8 private XMLException m_xmlException; 9 10 public void warning(SAXParseException exception) throws SAXException { 11 this.error(exception); 12 } 13 14 public void error(SAXParseException exception) throws SAXException { 15 if (m_xmlException == null) { 16 m_xmlException = new XMLException(); 17 } 18 m_xmlException.addNestedException(exception); 19 } 20 21 public void fatalError(SAXParseException exception) throws SAXException { 22 this.error(exception); 23 } 24 25 public XMLException getXMLException() { 26 return m_xmlException; 27 } 28 } 29 | Popular Tags |