diff --git a/src/helma/scripting/fesi/FesiEvaluator.java b/src/helma/scripting/fesi/FesiEvaluator.java index 0097f0ec..85a8179b 100644 --- a/src/helma/scripting/fesi/FesiEvaluator.java +++ b/src/helma/scripting/fesi/FesiEvaluator.java @@ -262,8 +262,10 @@ public class FesiEvaluator { String msg = x.getMessage (); if (msg == null || msg.length() < 10) msg = x.toString (); - System.err.println ("INVOKE-ERROR: "+msg); - x.printStackTrace (); + if (app.debug ()) { + System.err.println ("Error in Script: "+msg); + x.printStackTrace (); + } throw new ScriptingException (msg); } finally { // remove global variables that have been added during invocation. @@ -527,39 +529,13 @@ public class FesiEvaluator { public synchronized void updateEvaluator (Prototype prototype, Reader reader, EvaluationSource source) { - // HashMap priorProps = null; - // HashSet newProps = null; - try { ObjectPrototype op = getPrototype (prototype.getName()); - // extract all properties from prototype _before_ evaluation, so we can compare afterwards - // but only do this is declaredProps is not up to date yet - /*if (declaredPropsTimestamp != lastmod) { - priorProps = new HashMap (); - // remember properties before evaluation, so we can tell what's new afterwards - try { - for (Enumeration en=op.getAllProperties(); en.hasMoreElements(); ) { - String prop = (String) en.nextElement (); - priorProps.put (prop, op.getProperty (prop, prop.hashCode())); - } - } catch (Exception ignore) {} - } */ - // do the update, evaluating the file evaluator.evaluate(reader, op, source, false); - // check what's new - /* if (declaredPropsTimestamp != lastmod) try { - newProps = new HashSet (); - for (Enumeration en=op.getAllProperties(); en.hasMoreElements(); ) { - String prop = (String) en.nextElement (); - if (priorProps.get (prop) == null || op.getProperty (prop, prop.hashCode()) != priorProps.get (prop)) - newProps.add (prop); - } - } catch (Exception ignore) {} */ - } catch (Throwable e) { app.logEvent ("Error parsing function file "+source+": "+e); } finally { @@ -568,18 +544,6 @@ public class FesiEvaluator { reader.close(); } catch (IOException ignore) {} } - - // now remove the props that were not refreshed, and set declared props to new collection - /* if (declaredPropsTimestamp != lastmod) { - declaredPropsTimestamp = lastmod; - if (declaredProps != null) { - declaredProps.removeAll (newProps); - removeProperties (declaredProps); - } - declaredProps = newProps; - // System.err.println ("DECLAREDPROPS = "+declaredProps); - } */ - } }