| 1 7 8 package com.memoire.vainstall.builder.util; 9 10 import org.xml.sax.*; 11 12 21 public class XmlParseException extends SAXParseException { 22 23 private SAXParseException saxParseException; 24 25 public XmlParseException(SAXParseException exc) { 26 super(exc.getMessage(),(Locator)null); 27 saxParseException = exc; 28 } 29 30 public XmlParseException(String message, Locator locator) { 31 super(message,locator); 32 saxParseException = this; 33 } 34 35 public String getMessageAsHtml() { 36 37 String out = "<html><b><font color=black size=2><left>"; 38 out += "Parser Error :<br>"; 39 out += "<font color=red size=2>"+saxParseException.getMessage()+"</font><br>"; 40 out += "Line = <font color=red size=2>"+saxParseException.getLineNumber()+"</font><br>"; 41 out += "Column = <font color=red size=2>"+saxParseException.getColumnNumber()+"</font>"; 42 out += "</left></font></b></html>"; 43 44 return out; 45 } 46 47 } 48 | Popular Tags |