From 2dae1ca31f8a2e9c45492ba36a33bdfe503a0991 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Tue, 9 Jun 2015 17:06:48 -0700 Subject: [PATCH] better split-meta-elements error --- metas.rkt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/metas.rkt b/metas.rkt index dbf2ebf..f0c9f94 100644 --- a/metas.rkt +++ b/metas.rkt @@ -31,6 +31,8 @@ [else (reverse acc)]))) (define (split-meta-elements x) ; pull metas out of doc and put them into meta-elements accumulator + (when (not (txexpr? x)) + (error 'split-meta-elements "Not a txexpr: ~v" x)) (define-values (thing-without-meta-elements meta-elements) (splitf-txexpr x meta-element?)) ;; trivial metas are discarded (define exploded-meta-elements (append-map explode-meta-element (filter nontrivial-meta-element? meta-elements)))