Simplify exception handling in the web server
This commit is contained in:
parent
6337103525
commit
7de5901a94
1 changed files with 1 additions and 15 deletions
|
@ -305,21 +305,7 @@ on the procedure being called at any particular time."
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(with-exception-handler
|
(with-exception-handler
|
||||||
(lambda (exn)
|
(lambda (exn)
|
||||||
(let* ((stack (make-stack #t))
|
(print-backtrace-and-exception/knots exn)
|
||||||
(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)))
|
|
||||||
(raise-exception exn))
|
(raise-exception exn))
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(body body-port)))
|
(body body-port)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue