cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/generation ServerPagesGenerator.java
Date Mon, 23 Apr 2001 13:28:53 GMT
dims        01/04/23 06:28:53

  Modified:    src/org/apache/cocoon/generation Tag: xml-cocoon2
                        ServerPagesGenerator.java
  Log:
  Added more log messages and ensure that generator is released.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.24  +19 -4     xml-cocoon/src/org/apache/cocoon/generation/Attic/ServerPagesGenerator.java
  
  Index: ServerPagesGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/generation/Attic/ServerPagesGenerator.java,v
  retrieving revision 1.1.2.23
  retrieving revision 1.1.2.24
  diff -u -r1.1.2.23 -r1.1.2.24
  --- ServerPagesGenerator.java	2001/04/20 20:50:07	1.1.2.23
  +++ ServerPagesGenerator.java	2001/04/23 13:28:51	1.1.2.24
  @@ -44,7 +44,7 @@
    * delegating actual SAX event generation.
    *
    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
  - * @version CVS $Revision: 1.1.2.23 $ $Date: 2001/04/20 20:50:07 $
  + * @version CVS $Revision: 1.1.2.24 $ $Date: 2001/04/23 13:28:51 $
    */
   public class ServerPagesGenerator
     extends ServletGenerator
  @@ -150,7 +150,24 @@
       generator.setLexicalHandler(this);
       generator.setup(this.resolver, this.objectModel, this.source, this.parameters);
   
  -    generator.generate();
  +    // log exception and ensure that generator is released.
  +    try {
  +        generator.generate();
  +    } catch (IOException e){
  +        getLogger().error("IOException in ServerPagesGenerator.generate()", e);
  +        throw e;
  +    } catch (SAXException e){
  +        getLogger().error("SAXException in ServerPagesGenerator.generate()", e);
  +        throw e;
  +    } catch (ProcessingException e){
  +        getLogger().error("ProcessingException in ServerPagesGenerator.generate()", e);
  +        throw e;
  +    } catch (Exception e){
  +        getLogger().error("Exception in ServerPagesGenerator.generate()", e);
  +    } finally {
  +        if(generator != null)
  +            programGenerator.release(generator);
  +    }
   
       // End any started events in case of premature return
       while (this.eventStack.size()!=0) {
  @@ -181,8 +198,6 @@
             break;
         }
       }
  -
  -    programGenerator.release(generator);
     }
   
     /* Handlers */
  
  
  

----------------------------------------------------------------------
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