Abbreviate the fport_writer error message

From the web server.
This commit is contained in:
Christopher Baines 2025-03-10 21:32:55 +00:00
parent 710972691b
commit 47ff45d963

View file

@ -292,9 +292,20 @@ on the procedure being called at any particular time."
#f)
(define (default-write-response-exception-handler exn request)
(simple-format
(current-error-port)
"knots web server: exception replying to client: ~A\n" exn)
(if (and (exception-with-origin? exn)
(string=? (exception-origin exn)
"fport_write"))
(simple-format
(current-error-port)
"~A ~A: error replying to client\n"
(request-method request)
(uri-path (request-uri request)))
(simple-format
(current-error-port)
"knots web server: ~A ~A: exception replying to client: ~A\n"
(request-method request)
(uri-path (request-uri request))
exn))
;; Close the client port
#f)