[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.5-40-g2263cc

From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.5-40-g2263ccb
Date: Sat, 11 Feb 2012 17:28:08 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

The branch, stable-2.0 has been updated
       via  2263ccb53e6017cc89ccb69556a69d3ae7c2ff3b (commit)
      from  c2c3bddb1d0b2180282d78262e84c3ae7a44731f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2263ccb53e6017cc89ccb69556a69d3ae7c2ff3b
Author: Andy Wingo <address@hidden>
Date:   Sat Feb 11 18:27:56 2012 +0100

    web server: print backtrace on errors when run in batch mode
    * module/web/server.scm (read-client, handle-request, write-client):
      When run in batch mode, give a full backtrace for errors.


Summary of changes:
 module/web/server.scm |   24 ++++++++----------------
 1 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/module/web/server.scm b/module/web/server.scm
index ef6879e..b9bdef2 100644
--- a/module/web/server.scm
+++ b/module/web/server.scm
@@ -1,6 +1,6 @@
 ;;; Web server
-;; Copyright (C)  2010, 2011 Free Software Foundation, Inc.
+;; Copyright (C)  2010, 2011, 2012 Free Software Foundation, Inc.
 ;; This library is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU Lesser General Public
@@ -159,11 +159,8 @@ values."
    (lambda ()
      ((server-impl-read impl) server))
    #:pass-keys '(quit interrupt)
-   #:on-error (if (batch-mode?) 'pass 'debug)
-   #:post-error
-   (lambda (k . args)
-     (warn "Error while accepting client" k args)
-     (values #f #f #f))))
+   #:on-error (if (batch-mode?) 'backtrace 'debug)
+   #:post-error (lambda _ (values #f #f #f))))
 ;; like call-with-output-string, but actually closes the port (doh)
 (define (call-with-output-string* proc)
@@ -306,11 +303,9 @@ in, allowing the user's handler to explicitly manage its 
              (debug-elapsed 'sanitize)
              (values response body state))))))
    #:pass-keys '(quit interrupt)
-   #:on-error (if (batch-mode?) 'pass 'debug)
-   #:post-error
-   (lambda (k . args)
-     (warn "Error handling request" k args)
-     (values (build-response #:code 500) #f state))))
+   #:on-error (if (batch-mode?) 'backtrace 'debug)
+   #:post-error (lambda _
+                  (values (build-response #:code 500) #f state))))
 ;; -> unspecified values
 (define (write-client impl server client response body)
@@ -322,11 +317,8 @@ attaching it to the @var{server} argument somehow."
    (lambda ()
      ((server-impl-write impl) server client response body))
    #:pass-keys '(quit interrupt)
-   #:on-error (if (batch-mode?) 'pass 'debug)
-   #:post-error
-   (lambda (k . args)
-     (warn "Error while writing response" k args)
-     (values))))
+   #:on-error (if (batch-mode?) 'backtrace 'debug)
+   #:post-error (lambda _ (values))))
 ;; -> unspecified values
 (define (close-server impl server)

GNU Guile

reply via email to

[Prev in Thread] Current Thread [Next in Thread]