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.
This commit is contained in:
hns 2001-09-10 14:10:06 +00:00
parent 7e1108e7c3
commit a0bfef94eb

View file

@ -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) {}
} 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) {