cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r416397 - /cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/template/environment/FlowObjectModelHelper.java
Date Thu, 22 Jun 2006 15:22:57 GMT
Author: cziegeler
Date: Thu Jun 22 08:22:57 2006
New Revision: 416397

URL: http://svn.apache.org/viewvc?rev=416397&view=rev
Log:
Move javascript related stuff out of the TemplateObjectModelHelper

Modified:
    cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/template/environment/FlowObjectModelHelper.java

Modified: cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/template/environment/FlowObjectModelHelper.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/template/environment/FlowObjectModelHelper.java?rev=416397&r1=416396&r2=416397&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/template/environment/FlowObjectModelHelper.java
(original)
+++ cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/main/java/org/apache/cocoon/template/environment/FlowObjectModelHelper.java
Thu Jun 22 08:22:57 2006
@@ -17,6 +17,7 @@
 
 import java.util.Map;
 
+import org.apache.avalon.framework.CascadingRuntimeException;
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.cocoon.components.expression.ExpressionContext;
 import org.apache.cocoon.components.flow.FlowHelper;
@@ -47,15 +48,19 @@
             if (rootScope == null) {
                 rootScope = ctx.initStandardObjects(null);
             }
-            Scriptable scope = ctx.newObject(rootScope);
-            scope.setPrototype(rootScope);
-            scope.setParentScope(null);
-            return scope;
+            try {
+                Scriptable scope = ctx.newObject(rootScope);
+                scope.setPrototype(rootScope);
+                scope.setParentScope(null);
+                return scope;
+            } catch (Exception e) {
+                throw new CascadingRuntimeException("Exception", e);
+            }
         } finally {
             Context.exit();
         }
     }
-    
+
     /**
      * Create an expression context that contains the object model
      */



Mime
View raw message