From a0bfef94ebbc313859cad48bade564b331673eff Mon Sep 17 00:00:00 2001 From: hns Date: Mon, 10 Sep 2001 14:10:06 +0000 Subject: [PATCH] Some adjustments in Exception handling. No solution yet to the problem that Syntax errors in function files make applications ignore the changes in the file rather than report an error when a funciton from the file is called. --- src/helma/scripting/FunctionFile.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/helma/scripting/FunctionFile.java b/src/helma/scripting/FunctionFile.java index 2b59c0b1..463881a0 100644 --- a/src/helma/scripting/FunctionFile.java +++ b/src/helma/scripting/FunctionFile.java @@ -105,13 +105,11 @@ public class FunctionFile implements Updatable { } - public synchronized void updateRequestEvaluator (RequestEvaluator reval) { + public synchronized void updateRequestEvaluator (RequestEvaluator reval) throws IOException { if (file != null) { - try { - FileReader fr = new FileReader (file); - EvaluationSource es = new FileEvaluationSource (file.getPath (), null); - updateRequestEvaluator (reval, fr, es); - } catch (Exception ignore) {} + FileReader fr = new FileReader (file); + EvaluationSource es = new FileEvaluationSource (file.getPath (), null); + updateRequestEvaluator (reval, fr, es); } else { StringReader reader = new StringReader (content); StringEvaluationSource es = new StringEvaluationSource (content, null); @@ -154,8 +152,7 @@ public class FunctionFile implements Updatable { } } catch (Exception ignore) {} - } catch (Exception e) { - // app.logEvent ("Error parsing function file "+app.getName()+":"+prototype.getName()+"/"+file.getName()+": "+e); + } catch (Throwable e) { app.logEvent ("Error parsing function file "+source+": "+e); } finally { if (reader != null) {