Add another error handler in the reset from to catch errors occuring

while running the servlet (perhaps with restored continuations).
This commit is contained in:
interp 2002-11-09 18:25:20 +00:00
parent fb75cd4efe
commit 8e22009ca1
1 changed files with 12 additions and 4 deletions

View File

@ -118,6 +118,7 @@
(register-session! instance-id 'no-return)
(with-fatal-handler
;; Catch conditions from get-servlet-rt-structure.
(lambda (condition decline)
(delete-instance! instance-id)
(bad-gateway-error-response req path-string condition))
@ -127,10 +128,17 @@
(+ (time) (options-instance-lifetime))
memo))
(reset
(with-fatal-handler
;; Catch conditions that occur while running the servlet.
(lambda (condition decline)
(delete-instance! instance-id)
;; Restore correct continuation with shift.
(shift unused
(bad-gateway-error-response req path-string condition)))
(with-cwd servlet-path
(with-names-from-rt-structure
servlet servlet-interface
(main req))))))))
(main req)))))))))
(else ; We'll serve every non-scm file.
;; We need access to SEND-FILE-RESPONSE of
;; HTTPD-FILE-DIR-HANDLERS. In the official SUnet release, we