svn commit: r1345840 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ScriptUtil.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1345840 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ScriptUtil.java

jleroux@apache.org
Author: jleroux
Date: Mon Jun  4 06:07:19 2012
New Revision: 1345840

URL: http://svn.apache.org/viewvc?rev=1345840&view=rev
Log:
We agreed on that on dev ML: easier to use
GroovyUtil.runScriptAtLocation()
than
executeScript()
In case of error or debugging

Modified:
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ScriptUtil.java

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ScriptUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ScriptUtil.java?rev=1345840&r1=1345839&r2=1345840&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ScriptUtil.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ScriptUtil.java Mon Jun  4 06:07:19 2012
@@ -336,11 +336,11 @@ public final class ScriptUtil {
      */
     public static Object executeScript(String filePath, String functionName, Map<String, Object> context, Object[] args) {
         try {
-            /* Enable this to run Groovy data preparation scripts using GroovyUtil rather than the generic JSR223 that doesn't support debug mode
+            // Enabled to run Groovy data preparation scripts using GroovyUtil rather than the generic JSR223 that doesn't support debug mode
+            // and does not return a stack trace with line number on error
             if (filePath.endsWith(".groovy")) {
                 return GroovyUtil.runScriptAtLocation(filePath, functionName, context);
             }
-            */
             return executeScript(filePath, functionName, createScriptContext(context), args);
         } catch (Exception e) {
             String errMsg = "Error running script at location [" + filePath + "]: " + e.toString();