catch every condition only for load-config et al.; otherwise catch only errors.

This commit is contained in:
interp 2003-02-19 09:43:29 +00:00
parent c48ab741a7
commit 71650fbb41
2 changed files with 7 additions and 5 deletions

View File

@ -141,6 +141,7 @@
scheme-with-scsh ;regexp et al.
srfi-6 ;string-ports
thread-safe-counter
handle-fatal-error
)
(files surflet-handler))

View File

@ -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