01: package com.sun.portal.webxmlmerge;
02:
03: import java.io.*;
04: import javax.xml.parsers.*;
05: import org.xml.sax.*;
06: import org.xml.sax.helpers.*;
07:
08: public class MyErrorHandler implements ErrorHandler {
09:
10: private String myFileName;
11:
12: public void setFilename(String fileName) {
13: myFileName = fileName;
14: }
15:
16: public void warning(SAXParseException e) throws SAXException {
17: /*
18: System.err.println("WARNING: " + myFileName);
19: System.err.println("Line: " + e.getLineNumber());
20: */
21: }
22:
23: public void error(SAXParseException e) throws SAXException {
24: System.err.println("ERROR: " + myFileName);
25: System.err.println("Line: " + e.getLineNumber());
26: }
27:
28: public void fatalError(SAXParseException e) throws SAXException {
29: System.err.println("FATAL ERROR: " + myFileName);
30: System.err.println("Line: " + e.getLineNumber());
31: }
32:
33: }
|