From 10848be629ba28dd42f11b0cc47fa3e31658a462 Mon Sep 17 00:00:00 2001 From: hns Date: Mon, 28 Oct 2002 16:49:29 +0000 Subject: [PATCH] Improved error output in scripting engine initialization, create a ResponseTrans that knows about the RequestTrans if possible. --- src/helma/framework/core/RequestEvaluator.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/helma/framework/core/RequestEvaluator.java b/src/helma/framework/core/RequestEvaluator.java index 4420c0a1..c35dddee 100644 --- a/src/helma/framework/core/RequestEvaluator.java +++ b/src/helma/framework/core/RequestEvaluator.java @@ -80,9 +80,12 @@ public final class RequestEvaluator implements Runnable { Object[] args = {app, this}; scriptingEngine = (ScriptingEngine) method.invoke (null, args); } catch (Exception x) { + Throwable t = x; + if (x instanceof InvocationTargetException) + t = ((InvocationTargetException) x).getTargetException (); app.logEvent ("******************************************"); app.logEvent ("*** Error creating scripting engine: "); - app.logEvent ("*** "+x.toString()); + app.logEvent ("*** "+t.toString()); app.logEvent ("******************************************"); } } @@ -516,7 +519,7 @@ public final class RequestEvaluator implements Runnable { this.reqtype = HTTP; this.req = req; this.session = session; - this.res = new ResponseTrans (); + this.res = new ResponseTrans (req); app.activeRequests.put (req, this);