You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by tn...@apache.org on 2001/11/28 21:32:49 UTC

cvs commit: xml-xerces/c/src/framework XMLValidator.cpp

tng         01/11/28 12:32:49

  Modified:    c/src/framework XMLValidator.cpp
  Log:
  Do not increment the error count if it is a warning.
  
  Revision  Changes    Path
  1.12      +15 -9     xml-xerces/c/src/framework/XMLValidator.cpp
  
  Index: XMLValidator.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/framework/XMLValidator.cpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- XMLValidator.cpp	2001/10/24 23:46:52	1.11
  +++ XMLValidator.cpp	2001/11/28 20:32:49	1.12
  @@ -56,6 +56,9 @@
   
   /**
     * $Log: XMLValidator.cpp,v $
  +  * Revision 1.12  2001/11/28 20:32:49  tng
  +  * Do not increment the error count if it is a warning.
  +  *
     * Revision 1.11  2001/10/24 23:46:52  peiyongz
     * [Bug 4342] fix the leak.
     *
  @@ -176,9 +179,10 @@
   //
   void XMLValidator::emitError(const XMLValid::Codes toEmit)
   {
  -    //	Track our error count
  -    fScanner->incrementErrorCount();
  -    
  +    // Bump the error count if it is not a warning
  +    if (XMLValid::errorType(toEmit) != XMLErrorReporter::ErrType_Warning)
  +        fScanner->incrementErrorCount();
  +
       //	Call error reporter if we have one
       if (fErrorReporter)
       {
  @@ -233,9 +237,10 @@
                               , const XMLCh* const    text3
                               , const XMLCh* const    text4)
   {
  -    //	Track our error count
  -    fScanner->incrementErrorCount();
  -    
  +    // Bump the error count if it is not a warning
  +    if (XMLValid::errorType(toEmit) != XMLErrorReporter::ErrType_Warning)
  +        fScanner->incrementErrorCount();
  +
       //	Call error reporter if we have one
       if (fErrorReporter)
       {
  @@ -293,9 +298,10 @@
                               , const char* const     text3
                               , const char* const     text4)
   {
  -    //	Track our error count
  -    fScanner->incrementErrorCount();
  -    
  +    // Bump the error count if it is not a warning
  +    if (XMLValid::errorType(toEmit) != XMLErrorReporter::ErrType_Warning)
  +        fScanner->incrementErrorCount();
  +
       //	Call error reporter if we have one
       if (fErrorReporter)
       {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org