From 8cced0532ab69a2346654540a4d01bc64392c359 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Thu, 15 Oct 2020 00:30:15 +0200 Subject: Fix error propagation for some search queries. --- module/vcomponent/search.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'module') diff --git a/module/vcomponent/search.scm b/module/vcomponent/search.scm index fef0b100..27483720 100644 --- a/module/vcomponent/search.scm +++ b/module/vcomponent/search.scm @@ -162,8 +162,11 @@ (set-max-page! paginator (max page (get-max-page paginator))) result)))) (lambda (err proc fmt args data) - ;; TODO ensure the error actually is index out of range. - ;; (format (current-error-port) "~?~%" fmt args) + ;; NOTE This is mostly a hack to see that we + ;; actually check for the correct error. + (unless (string=? fmt "beyond end of stream") + (scm-error err proc fmt args data)) + (set-max-page! paginator (get-max-page paginator)) (set-true-max-page! paginator) (throw 'max-page (get-max-page paginator)) -- cgit v1.2.3