Query serving error report improvement.
[scratchy.git] / burrower.scm
index a03c266..581ea9c 100644 (file)
               (lambda ()
                 (apply (eval (read))
                        (list (car arguments) remote-ip)))))))
-        (error "Invalid query."))))
+        (error "Invalid query." selector arguments))))
 
 
 ;;; Index rendering
    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