From 7260be120168a6e0edc4472dce7f107ad4adb08f Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Sun, 15 Jun 2014 14:31:48 +0200 Subject: [PATCH] Issue 3954: Report bad return values in user-readable form An error message like markup-def.ly:11:20: error: music function cannot return (# (Test)) is not really user-readable. At the price of some possible ambiguity, using a LilyPond syntax form like markup-def.ly:11:20: error: music function cannot return \markup \line { Test} is quite preferable. --- scm/ly-syntax-constructors.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scm/ly-syntax-constructors.scm b/scm/ly-syntax-constructors.scm index 2712fc21f3..73e871686e 100644 --- a/scm/ly-syntax-constructors.scm +++ b/scm/ly-syntax-constructors.scm @@ -64,7 +64,8 @@ (if good (ly:parser-error parser (format #f (_ "~a function cannot return ~a") - (type-name pred) m) + (type-name pred) + (value->lily-string m parser)) loc)) (and (pair? (car sig)) (cdar sig)))))) -- 2.39.5