From 71650fbb41d52b80541e0439a348b2c9ec3a4de0 Mon Sep 17 00:00:00 2001 From: interp Date: Wed, 19 Feb 2003 09:43:29 +0000 Subject: [PATCH] catch every condition only for load-config et al.; otherwise catch only errors. --- scheme/httpd/surflets/packages.scm | 1 + scheme/httpd/surflets/surflet-handler.scm | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/scheme/httpd/surflets/packages.scm b/scheme/httpd/surflets/packages.scm index 70fc7be..85d20e2 100644 --- a/scheme/httpd/surflets/packages.scm +++ b/scheme/httpd/surflets/packages.scm @@ -141,6 +141,7 @@ scheme-with-scsh ;regexp et al. srfi-6 ;string-ports thread-safe-counter + handle-fatal-error ) (files surflet-handler)) diff --git a/scheme/httpd/surflets/surflet-handler.scm b/scheme/httpd/surflets/surflet-handler.scm index cd5c16f..b750895 100644 --- a/scheme/httpd/surflets/surflet-handler.scm +++ b/scheme/httpd/surflets/surflet-handler.scm @@ -63,7 +63,6 @@ ;; path of the request, SURFLET-PATH is a string pointing to the real ;; directory of the SUrflets, and S-REQ the request of the browser. (define (launch-new-session path-string surflet-path s-req) - (cond ((file-not-exists? (absolute-file-name path-string surflet-path)) @@ -86,7 +85,7 @@ (release-lock *session-table-lock*) (register-instance! session-id) - (with-fatal-handler + (with-fatal-error-handler ;; Catch conditions from get-surflet-rt-structure. (lambda (condition decline) (delete-session! session-id) @@ -97,7 +96,7 @@ (+ (time) (options-session-lifetime)) memo)) (reset - (with-fatal-handler + (with-fatal-error-handler ;; Catch conditions that occur while running the surflet. (lambda (condition decline) (delete-session! session-id) @@ -347,7 +346,7 @@ ;;; RESET-SESSION-TABLE! ;; Clears the *SESSION-TABLE* (locking) (define (reset-session-table!) - (with-fatal-handler + (with-fatal-error-handler (lambda (condtion decline) (release-lock *session-table-lock*) (decline)) @@ -448,10 +447,12 @@ (define get-surflet-rt-structure (let ((load-surflet (lambda (full-surflet-name cached?) + ;; Want to get warnings also. (with-fatal-handler* (lambda (condition decline) (if cached? (release-lock *surflet-table-lock*)) - (decline)) + ;; Let the others do the job. + (error condition)) (lambda () ;; load-config-file does not care about cwd(?) ;; --> absolute file name needed