Author: jonesde
Date: Tue Apr  3 14:17:50 2007
New Revision: 525281

URL: http://svn.apache.org/viewvc?view=rev&rev=525281
Log:
Changed to better handle the error when the bsh location is not valid

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

Modified: ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/BshUtil.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/BshUtil.java?view=diff&rev=525281&r1=525280&r2=525281
==============================================================================
--- ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/BshUtil.java 
(original)
+++ ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/BshUtil.java Tue 
Apr  3 14:17:50 2007
@@ -147,6 +147,9 @@
                     script = (Interpreter.ParsedScript) 
parsedScripts.get(location);
                     if (script == null) {
                         URL scriptUrl = 
FlexibleLocation.resolveLocation(location);
+                        if (scriptUrl == null) {
+                            throw new GeneralException("Could not find bsh 
script at [" + location + "]");
+                        }
                         Reader scriptReader = new 
InputStreamReader(scriptUrl.openStream());
                         script = interpreter.parseScript(location, 
scriptReader);
                         if (Debug.verboseOn()) Debug.logVerbose("Caching BSH 
script at: " + location, module);


Reply via email to