From d359b34d425e0f30db847083007af17f7fc0ce13 Mon Sep 17 00:00:00 2001 From: Tim Vaughan Date: Sun, 5 May 2019 22:47:54 +0200 Subject: [PATCH 1/1] Query serving error report improvement. --- burrower.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 -- 2.20.1