Simplify exception handling in the web server

This commit is contained in:
Christopher Baines 2025-02-06 16:45:22 +00:00
parent 6337103525
commit 7de5901a94

View file

@ -305,21 +305,7 @@ on the procedure being called at any particular time."
(lambda ()
(with-exception-handler
(lambda (exn)
(let* ((stack (make-stack #t))
(error-string
(call-with-output-string
(lambda (port)
(print-exception
port
(stack-ref stack 2)
'%exception
(list exn))
(display-backtrace
stack
port
2)))))
(display error-string
(current-error-port)))
(print-backtrace-and-exception/knots exn)
(raise-exception exn))
(lambda ()
(body body-port)))