You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by cu...@apache.org on 2001/12/19 00:06:28 UTC

cvs commit: xml-xalan/test/java/src/org/apache/qetest/trax LoggingErrorListener.java

curcuru     01/12/18 15:06:28

  Modified:    test/java/src/org/apache/qetest/trax
                        LoggingErrorListener.java
  Log:
  Have ErrorListener impls throw same exception instead of new one
  
  Revision  Changes    Path
  1.3       +9 -4      xml-xalan/test/java/src/org/apache/qetest/trax/LoggingErrorListener.java
  
  Index: LoggingErrorListener.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/test/java/src/org/apache/qetest/trax/LoggingErrorListener.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LoggingErrorListener.java	2001/02/21 19:37:59	1.2
  +++ LoggingErrorListener.java	2001/12/18 23:06:28	1.3
  @@ -75,7 +75,7 @@
    * as to when we should validate specific events that we handle.</p>
    * //@todo try calling getLocator() and asking it for info directly
    * @author shane_curcuru@lotus.com
  - * @version $Id: LoggingErrorListener.java,v 1.2 2001/02/21 19:37:59 curcuru Exp $
  + * @version $Id: LoggingErrorListener.java,v 1.3 2001/12/18 23:06:28 curcuru Exp $
    */
   public class LoggingErrorListener extends LoggingHandler implements ErrorListener
   {
  @@ -304,6 +304,8 @@
   
       /**
        * Grab basic info out of a TransformerException.
  +     * Worker method to hide implementation; currently just calls 
  +     * exception.getMessageAndLocation().
        *
        * @param exception to get information from
        * @return simple string describing the exception (getMessageAndLocation())
  @@ -340,7 +342,8 @@
           // Also re-throw the exception if asked to
           if ((throwWhen & THROW_ON_WARNING) == THROW_ON_WARNING)
           {
  -            throw new TransformerException(exception);
  +            // Note: re-throw the SAME exception, not a new one!
  +            throw exception;
           }
       }
   
  @@ -367,7 +370,8 @@
           // Also re-throw the exception if asked to
           if ((throwWhen & THROW_ON_ERROR) == THROW_ON_ERROR)
           {
  -            throw new TransformerException(exception);
  +            // Note: re-throw the SAME exception, not a new one!
  +            throw exception;
           }
       }
   
  @@ -396,7 +400,8 @@
           // Also re-throw the exception if asked to
           if ((throwWhen & THROW_ON_FATAL) == THROW_ON_FATAL)
           {
  -            throw new TransformerException(exception);
  +            // Note: re-throw the SAME exception, not a new one!
  +            throw exception;
           }
       }
   
  
  
  

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