* Do not print out exception messages multiple times.
* Create a scripting exception wrapping the original exception.
This commit is contained in:
parent
c1338c3d67
commit
4babc5c850
1 changed files with 2 additions and 6 deletions
|
@ -419,15 +419,11 @@ public final class FesiEngine implements ScriptingEngine {
|
||||||
// has the request timed out? If so, throw TimeoutException
|
// has the request timed out? If so, throw TimeoutException
|
||||||
if (evaluator.thread != Thread.currentThread())
|
if (evaluator.thread != Thread.currentThread())
|
||||||
throw new TimeoutException ();
|
throw new TimeoutException ();
|
||||||
// create and throw a ScriptingException with the right message
|
|
||||||
String msg = x.getMessage ();
|
|
||||||
if (msg == null || msg.length() < 10)
|
|
||||||
msg = x.toString ();
|
|
||||||
if (app.debug ()) {
|
if (app.debug ()) {
|
||||||
System.err.println ("Error in Script: "+msg);
|
|
||||||
x.printStackTrace ();
|
x.printStackTrace ();
|
||||||
}
|
}
|
||||||
throw new ScriptingException (msg);
|
// create and throw a ScriptingException wrapping the original exception
|
||||||
|
throw new ScriptingException (x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue