Return-Path: Mailing-List: contact websh-dev-help@tcl.apache.org; run by ezmlm Delivered-To: mailing list websh-dev@tcl.apache.org Received: (qmail 65373 invoked from network); 27 Nov 2001 12:06:41 -0000 Received: from ppp-39-11.25-151.libero.it (HELO ashland) (151.25.11.39) by daedalus.apache.org with SMTP; 27 Nov 2001 12:06:41 -0000 Received: by ashland (Postfix, from userid 1000) id 1F3684CB88; Tue, 27 Nov 2001 13:07:05 +0100 (CET) To: websh-dev@tcl.apache.org Subject: 'catch' web::dispatch From: davidw@dedasys.com (David N. Welton) Date: 27 Nov 2001 13:07:04 +0100 Message-ID: <87u1vgct93.fsf@dedasys.com> Lines: 40 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset= Content-Transfer-Encoding: quoted-printable X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3D4729 Situation: want a global catch across all web::command procs # global error catcher if {[catch {web::dispatch -hook {logHttpRequest;=A0normalizeHttpRequest= }} errMsg]} { # we signal every error to the client web::log pisa.error ""Exception: $errMsg"" sendHttpErrorResponse ""Exception: $errMsg"" } Problem: web::dispatch catches possible errors and modifies errorMessage -> the original errorMessage is not available anymore Suggestion: remove catch from web::dispatch or do not modify original error message This bit of code above is specific to some app or another... what is the real problem here? What would be a simple test case to demonstrate the problem? web::command default { BLARGH } if { [catch {web::dispatch} errmsg] } { # we signal every error to the client web::put $errmsg web::put $errmsg } Is something I've tried, but I don't quite see the problem... --=20 David N. Welton Consulting: http://www.dedasys.com/ Free Software: http://people.debian.org/~davidw/ Apache Tcl: http://tcl.apache.org/ Personal: http://www.efn.org/~davidw/