From 8d85952f2404c0abc9a606b89aac95d1ed134540 Mon Sep 17 00:00:00 2001 From: hns Date: Wed, 23 Oct 2002 12:46:21 +0000 Subject: [PATCH] Always abort transaction when catching an error in HTTP request loop. This is because a new transaction is started for the error handling also, so if something goes wrong in error handling, we need to abort the transaction. --- src/helma/framework/core/RequestEvaluator.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/helma/framework/core/RequestEvaluator.java b/src/helma/framework/core/RequestEvaluator.java index 8908a4d7..182f9a00 100644 --- a/src/helma/framework/core/RequestEvaluator.java +++ b/src/helma/framework/core/RequestEvaluator.java @@ -290,17 +290,18 @@ public final class RequestEvaluator implements Runnable { } catch (Exception x) { + abortTransaction (false); + // 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) { - abortTransaction (false); break; } res.reset (); + // check if we tried to process the error already if (error == null) { - abortTransaction (false); app.errorCount += 1; app.logEvent ("Exception in "+Thread.currentThread()+": "+x); // Dump the profiling data to System.err