You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-cvs@xml.apache.org by nd...@apache.org on 2005/12/01 13:34:30 UTC

svn commit: r350239 - /xml/commons/trunk/java/src/org/apache/xml/resolver/apps/XParseError.java

Author: ndw
Date: Thu Dec  1 04:34:26 2005
New Revision: 350239

URL: http://svn.apache.org/viewcvs?rev=350239&view=rev
Log:
Make sure the first warning and/or error is displayed

Modified:
    xml/commons/trunk/java/src/org/apache/xml/resolver/apps/XParseError.java

Modified: xml/commons/trunk/java/src/org/apache/xml/resolver/apps/XParseError.java
URL: http://svn.apache.org/viewcvs/xml/commons/trunk/java/src/org/apache/xml/resolver/apps/XParseError.java?rev=350239&r1=350238&r2=350239&view=diff
==============================================================================
--- xml/commons/trunk/java/src/org/apache/xml/resolver/apps/XParseError.java (original)
+++ xml/commons/trunk/java/src/org/apache/xml/resolver/apps/XParseError.java Thu Dec  1 04:34:26 2005
@@ -101,32 +101,26 @@
 
   /** SAX2 API */
   public void error(SAXParseException exception) {
-    if (showErrors) {
-      if (errorCount+warningCount < maxMessages) {
+    errorCount++;
+    if (showErrors && (errorCount+warningCount < maxMessages)) {
 	message("Error", exception);
-      }
-      errorCount++;
     }
   }
 
   /** SAX2 API */
   public void fatalError(SAXParseException exception) {
-    if (showErrors) {
-      if (errorCount+warningCount < maxMessages) {
+    errorCount++;
+    fatalCount++;
+    if (showErrors && (errorCount+warningCount < maxMessages)) {
 	message("Fatal error", exception);
-      }
-      errorCount++;
-      fatalCount++;
     }
   }
 
   /** SAX2 API */
   public void warning(SAXParseException exception) {
-    if (showWarnings) {
-      if ((errorCount+warningCount < maxMessages)) {
+    warningCount++;
+    if (showWarnings && (errorCount+warningCount < maxMessages)) {
 	message("Warning", exception);
-      }
-      warningCount++;
     }
   }