From: Tim Vaughan Date: Sun, 5 May 2019 20:47:54 +0000 (+0200) Subject: Query serving error report improvement. X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=scratchy.git;a=commitdiff_plain;h=d359b34d425e0f30db847083007af17f7fc0ce13 Query serving error report improvement. --- diff --git a/burrower.scm b/burrower.scm index a03c266..581ea9c 100644 --- a/burrower.scm +++ b/burrower.scm @@ -156,7 +156,7 @@ (lambda () (apply (eval (read)) (list (car arguments) remote-ip))))))) - (error "Invalid query.")))) + (error "Invalid query." selector arguments)))) ;;; Index rendering @@ -202,7 +202,10 @@ dir-selector config (lambda () (let-values (((in-port out-port id) (process command))) - (serve-info-records (string-chomp (read-string #f in-port) "\n")))))) + (let ((string (read-string #f in-port))) + (if (and (not (eof-object? string)) + (> (string-length string) 0)) + (serve-info-records (string-chomp string "\n")))))))) (define (serve-expression expression dir-selector config) (with-selector-dir