cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/components/language/markup LogicsheetCodeGenerator.java
Date Wed, 30 Jan 2002 19:21:26 GMT
dims        02/01/30 11:21:26

  Modified:    src/java/org/apache/cocoon/components/language/markup
                        LogicsheetCodeGenerator.java
  Log:
  If there is a cause exception, rethrow the cause else throw the actual exception itself.
This prevents NullPointerException in case the cause exception is not present.
  
  Revision  Changes    Path
  1.6       +7 -3      xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/LogicsheetCodeGenerator.java
  
  Index: LogicsheetCodeGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/LogicsheetCodeGenerator.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- LogicsheetCodeGenerator.java	26 Jan 2002 17:13:33 -0000	1.5
  +++ LogicsheetCodeGenerator.java	30 Jan 2002 19:21:26 -0000	1.6
  @@ -34,7 +34,7 @@
    *
    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
    * @author <a href="mailto:dims@yahoo.com">Davanum Srinivas</a>
  - * @version CVS $Revision: 1.5 $ $Date: 2002/01/26 17:13:33 $
  + * @version CVS $Revision: 1.6 $ $Date: 2002/01/30 19:21:26 $
    */
   public class LogicsheetCodeGenerator extends AbstractLoggable implements MarkupCodeGenerator
{
   
  @@ -134,8 +134,12 @@
               this.rootReader.parse(input);
               return this.writer.toString();
           } catch (SAXException e) {
  -            getLogger().debug("Got SAXException; Rethrowing cause exception", e);
  -            throw e.getException();
  +            if(e.getException() != null) {
  +                getLogger().debug("Got SAXException; Rethrowing cause exception", e);
  +                throw e.getException();
  +            }
  +            getLogger().debug("Got SAXException", e);
  +            throw e;
           }
       }
   }
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message