Log to the event log when an internal scheduler or XML-RPC invoked function
throws an exception Fixes bug 196, http://helma.org/bugs/show_bug.cgi?id=196
This commit is contained in:
parent
f6b2909aad
commit
829b8bccc3
1 changed files with 10 additions and 6 deletions
|
@ -351,7 +351,7 @@ public final class RequestEvaluator implements Runnable {
|
|||
break;
|
||||
case XMLRPC:
|
||||
try {
|
||||
localrtx.begin (app.getName()+":xmlrpc/"+method);
|
||||
localrtx.begin (app.getName()+":xmlrpc:"+method);
|
||||
|
||||
root = app.getDataRoot ();
|
||||
|
||||
|
@ -386,23 +386,25 @@ public final class RequestEvaluator implements Runnable {
|
|||
result = scriptingEngine.invoke (currentElement, method, args, true);
|
||||
commitTransaction ();
|
||||
|
||||
} catch (Exception wrong) {
|
||||
} catch (Exception x) {
|
||||
|
||||
abortTransaction (false);
|
||||
|
||||
app.logEvent ("Exception in "+Thread.currentThread()+": "+x);
|
||||
|
||||
// If the transactor thread has been killed by the invoker thread we don't have to
|
||||
// bother for the error message, just quit.
|
||||
if (localrtx != rtx) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.exception = wrong;
|
||||
this.exception = x;
|
||||
}
|
||||
|
||||
break;
|
||||
case INTERNAL:
|
||||
// Just a human readable descriptor of this invocation
|
||||
String funcdesc = app.getName()+":internal/"+method;
|
||||
String funcdesc = app.getName()+":internal:"+method;
|
||||
|
||||
// if thisObject is an instance of NodeHandle, get the node object itself.
|
||||
if (thisObject != null && thisObject instanceof NodeHandle) {
|
||||
|
@ -438,17 +440,19 @@ public final class RequestEvaluator implements Runnable {
|
|||
result = scriptingEngine.invoke (thisObject, method, args, false);
|
||||
commitTransaction ();
|
||||
|
||||
} catch (Exception wrong) {
|
||||
} catch (Exception x) {
|
||||
|
||||
abortTransaction (false);
|
||||
|
||||
app.logEvent ("Exception in "+Thread.currentThread()+": "+x);
|
||||
|
||||
// If the transactor thread has been killed by the invoker thread we don't have to
|
||||
// bother for the error message, just quit.
|
||||
if (localrtx != rtx) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.exception = wrong;
|
||||
this.exception = x;
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue