catch every condition only for load-config et al.; otherwise catch only errors.
This commit is contained in:
parent
c48ab741a7
commit
71650fbb41
|
@ -141,6 +141,7 @@
|
||||||
scheme-with-scsh ;regexp et al.
|
scheme-with-scsh ;regexp et al.
|
||||||
srfi-6 ;string-ports
|
srfi-6 ;string-ports
|
||||||
thread-safe-counter
|
thread-safe-counter
|
||||||
|
handle-fatal-error
|
||||||
)
|
)
|
||||||
(files surflet-handler))
|
(files surflet-handler))
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,6 @@
|
||||||
;; path of the request, SURFLET-PATH is a string pointing to the real
|
;; 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.
|
;; directory of the SUrflets, and S-REQ the request of the browser.
|
||||||
(define (launch-new-session path-string surflet-path s-req)
|
(define (launch-new-session path-string surflet-path s-req)
|
||||||
|
|
||||||
(cond
|
(cond
|
||||||
|
|
||||||
((file-not-exists? (absolute-file-name path-string surflet-path))
|
((file-not-exists? (absolute-file-name path-string surflet-path))
|
||||||
|
@ -86,7 +85,7 @@
|
||||||
(release-lock *session-table-lock*)
|
(release-lock *session-table-lock*)
|
||||||
(register-instance! session-id)
|
(register-instance! session-id)
|
||||||
|
|
||||||
(with-fatal-handler
|
(with-fatal-error-handler
|
||||||
;; Catch conditions from get-surflet-rt-structure.
|
;; Catch conditions from get-surflet-rt-structure.
|
||||||
(lambda (condition decline)
|
(lambda (condition decline)
|
||||||
(delete-session! session-id)
|
(delete-session! session-id)
|
||||||
|
@ -97,7 +96,7 @@
|
||||||
(+ (time) (options-session-lifetime))
|
(+ (time) (options-session-lifetime))
|
||||||
memo))
|
memo))
|
||||||
(reset
|
(reset
|
||||||
(with-fatal-handler
|
(with-fatal-error-handler
|
||||||
;; Catch conditions that occur while running the surflet.
|
;; Catch conditions that occur while running the surflet.
|
||||||
(lambda (condition decline)
|
(lambda (condition decline)
|
||||||
(delete-session! session-id)
|
(delete-session! session-id)
|
||||||
|
@ -347,7 +346,7 @@
|
||||||
;;; RESET-SESSION-TABLE!
|
;;; RESET-SESSION-TABLE!
|
||||||
;; Clears the *SESSION-TABLE* (locking)
|
;; Clears the *SESSION-TABLE* (locking)
|
||||||
(define (reset-session-table!)
|
(define (reset-session-table!)
|
||||||
(with-fatal-handler
|
(with-fatal-error-handler
|
||||||
(lambda (condtion decline)
|
(lambda (condtion decline)
|
||||||
(release-lock *session-table-lock*)
|
(release-lock *session-table-lock*)
|
||||||
(decline))
|
(decline))
|
||||||
|
@ -448,10 +447,12 @@
|
||||||
(define get-surflet-rt-structure
|
(define get-surflet-rt-structure
|
||||||
(let ((load-surflet
|
(let ((load-surflet
|
||||||
(lambda (full-surflet-name cached?)
|
(lambda (full-surflet-name cached?)
|
||||||
|
;; Want to get warnings also.
|
||||||
(with-fatal-handler*
|
(with-fatal-handler*
|
||||||
(lambda (condition decline)
|
(lambda (condition decline)
|
||||||
(if cached? (release-lock *surflet-table-lock*))
|
(if cached? (release-lock *surflet-table-lock*))
|
||||||
(decline))
|
;; Let the others do the job.
|
||||||
|
(error condition))
|
||||||
(lambda ()
|
(lambda ()
|
||||||
;; load-config-file does not care about cwd(?)
|
;; load-config-file does not care about cwd(?)
|
||||||
;; --> absolute file name needed
|
;; --> absolute file name needed
|
||||||
|
|
Loading…
Reference in New Issue