You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@apache.org on 2001/06/27 05:03:49 UTC
cvs commit: xml-xalan/java/src/org/apache/xml/utils DefaultErrorHandler.java
sboag 01/06/26 20:03:49
Modified: java/src/org/apache/xml/utils DefaultErrorHandler.java
Log:
Send the errors to System.err instead of System.out.
Have the SAX handler functions go ahead and print the
error message. I think the ErrorListener functions should do
this also, but I'm afraid I'll cause a regression somewhere if I
mess with this.
The responsibility of who should print the error... the error handler
or the exception catcher is way too fuzzy... we need to crisp this
up for JAXP 1.2.
Revision Changes Path
1.5 +8 -6 xml-xalan/java/src/org/apache/xml/utils/DefaultErrorHandler.java
Index: DefaultErrorHandler.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/utils/DefaultErrorHandler.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- DefaultErrorHandler.java 2001/01/26 01:46:01 1.4
+++ DefaultErrorHandler.java 2001/06/27 03:03:48 1.5
@@ -94,7 +94,7 @@
public void warning(SAXParseException exception) throws SAXException
{
printLocation(exception);
- System.out.println("Parser warning: " + exception.getMessage());
+ System.err.println("Parser warning: " + exception.getMessage());
}
/**
@@ -121,6 +121,7 @@
public void error(SAXParseException exception) throws SAXException
{
printLocation(exception);
+ System.err.println(exception.getMessage());
throw exception;
}
@@ -147,6 +148,7 @@
public void fatalError(SAXParseException exception) throws SAXException
{
printLocation(exception);
+ System.err.println(exception.getMessage());
throw exception;
}
@@ -172,7 +174,7 @@
{
printLocation(exception);
- System.out.println(exception.getMessage());
+ System.err.println(exception.getMessage());
}
/**
@@ -233,11 +235,11 @@
private void printLocation(org.xml.sax.SAXParseException exception)
{
- // System.out.println("Parser fatal error: "+exception.getMessage());
+ // System.err.println("Parser fatal error: "+exception.getMessage());
String id = (null != exception.getSystemId())
? exception.getSystemId() : "SystemId Unknown";
- System.out.print(id + "; Line " + exception.getLineNumber()
+ System.err.print(id + "; Line " + exception.getLineNumber()
+ "; Column " + exception.getColumnNumber()+"; ");
}
@@ -248,13 +250,13 @@
if(null != locator)
{
- // System.out.println("Parser fatal error: "+exception.getMessage());
+ // System.err.println("Parser fatal error: "+exception.getMessage());
String id = (locator.getPublicId() != locator.getPublicId())
? locator.getPublicId()
: (null != locator.getSystemId())
? locator.getSystemId() : "SystemId Unknown";
- System.out.print(id + "; Line " + locator.getLineNumber()
+ System.err.print(id + "; Line " + locator.getLineNumber()
+ "; Column " + locator.getColumnNumber()+"; ");
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org