From 96c2d6467dec0ad3280f367de234e2bce03b981f Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 11 Mar 2015 14:39:09 +0100 Subject: condition: Always use a literal format string. * src/guile/skribilo/condition.scm (%call-with-skribilo-error-catch) [message-condition? c]: Pass a format string to 'format'. --- src/guile/skribilo/condition.scm | 2 +- src/guile/skribilo/package/base.scm | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/guile/skribilo/condition.scm b/src/guile/skribilo/condition.scm index 97c97b1..5c3f684 100644 --- a/src/guile/skribilo/condition.scm +++ b/src/guile/skribilo/condition.scm @@ -212,7 +212,7 @@ (abort exit-val)) ((message-condition? c) - (format (current-error-port) (condition-message c)) + (format (current-error-port) "~a~%" (condition-message c)) (abort exit-val)) (else diff --git a/src/guile/skribilo/package/base.scm b/src/guile/skribilo/package/base.scm index 082f33a..4cc5f93 100644 --- a/src/guile/skribilo/package/base.scm +++ b/src/guile/skribilo/package/base.scm @@ -743,19 +743,13 @@ (cells-vals '(collapse separate))) (cond ((and frame (not (memq frame frame-vals))) - (skribe-error 'table - (format #f "frame should be one of \"~a\"" frame-vals) - frame)) + (invalid-argument-error 'table frame 'frame)) ((and rules (not (memq rules rules-vals))) - (skribe-error 'table - (format #f "rules should be one of \"~a\"" rules-vals) - rules)) + (invalid-argument-error 'table rules 'rules)) ((not (or (memq cellstyle cells-vals) (string? cellstyle) (number? cellstyle))) - (skribe-error 'table - (format #f "cellstyle should be one of \"~a\", or a number, or a string" cells-vals) - cellstyle)) + (invalid-argument-error 'table cellstyle 'cellstyle)) (else (new container (markup 'table) -- cgit v1.2.3