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:
parent
7e1108e7c3
commit
a0bfef94eb
1 changed files with 5 additions and 8 deletions
|
@ -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) {
|
if (file != null) {
|
||||||
try {
|
|
||||||
FileReader fr = new FileReader (file);
|
FileReader fr = new FileReader (file);
|
||||||
EvaluationSource es = new FileEvaluationSource (file.getPath (), null);
|
EvaluationSource es = new FileEvaluationSource (file.getPath (), null);
|
||||||
updateRequestEvaluator (reval, fr, es);
|
updateRequestEvaluator (reval, fr, es);
|
||||||
} catch (Exception ignore) {}
|
|
||||||
} else {
|
} else {
|
||||||
StringReader reader = new StringReader (content);
|
StringReader reader = new StringReader (content);
|
||||||
StringEvaluationSource es = new StringEvaluationSource (content, null);
|
StringEvaluationSource es = new StringEvaluationSource (content, null);
|
||||||
|
@ -154,8 +152,7 @@ public class FunctionFile implements Updatable {
|
||||||
}
|
}
|
||||||
} catch (Exception ignore) {}
|
} catch (Exception ignore) {}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Throwable e) {
|
||||||
// app.logEvent ("Error parsing function file "+app.getName()+":"+prototype.getName()+"/"+file.getName()+": "+e);
|
|
||||||
app.logEvent ("Error parsing function file "+source+": "+e);
|
app.logEvent ("Error parsing function file "+source+": "+e);
|
||||||
} finally {
|
} finally {
|
||||||
if (reader != null) {
|
if (reader != null) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue