From 47ff45d96331cf885e1e3d3ad8748295d182f882 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Mon, 10 Mar 2025 21:32:55 +0000 Subject: [PATCH] Abbreviate the fport_writer error message From the web server. --- knots/web-server.scm | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/knots/web-server.scm b/knots/web-server.scm index 92e8db6..9b98018 100644 --- a/knots/web-server.scm +++ b/knots/web-server.scm @@ -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)