roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agillil...@apache.org
Subject svn commit: r434085 - /incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/velocity/VelocityRendererFactory.java
Date Wed, 23 Aug 2006 17:16:51 GMT
Author: agilliland
Date: Wed Aug 23 10:16:51 2006
New Revision: 434085

URL: http://svn.apache.org/viewvc?rev=434085&view=rev
Log:
log the error if there is an exception generated while trying to construct the velocity renderer
object.  we don't expect this to happen.


Modified:
    incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/velocity/VelocityRendererFactory.java

Modified: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/velocity/VelocityRendererFactory.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/velocity/VelocityRendererFactory.java?rev=434085&r1=434084&r2=434085&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/velocity/VelocityRendererFactory.java
(original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/velocity/VelocityRendererFactory.java
Wed Aug 23 10:16:51 2006
@@ -18,15 +18,20 @@
 
 package org.apache.roller.ui.rendering.velocity;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.roller.pojos.Template;
 import org.apache.roller.ui.rendering.Renderer;
 import org.apache.roller.ui.rendering.RendererFactory;
 
+
 /**
  * Velocity RendererFactory for Roller.
  */
 public class VelocityRendererFactory implements RendererFactory {
     
+    private static Log log = LogFactory.getLog(VelocityRendererFactory.class);
+    
     
     public Renderer getRenderer(Template template) {
         
@@ -42,8 +47,9 @@
             // standard velocity template
             try {
                renderer = new VelocityRenderer(template);
-            } catch(Exception ignored) {
-                // can't render
+            } catch(Exception ex) {
+                // some kind of problem creating renderer
+                log.error("Error creating renderer for "+template.getId(), ex);
             }            
             
         }



Mime
View raw message