From a0a35d189f39d9bbb4dc76915bc717a681b31e3b Mon Sep 17 00:00:00 2001 From: "Sunrin SHIMURA (keen)" <3han5chou7@gmail.com> Date: Sun, 18 Jan 2015 11:39:04 +0000 Subject: [PATCH] improve error message for record accessor and setter --- piclib/picrin/record.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/piclib/picrin/record.scm b/piclib/picrin/record.scm index 6784524b..7559cbbe 100644 --- a/piclib/picrin/record.scm +++ b/piclib/picrin/record.scm @@ -80,16 +80,16 @@ `(define (,accessor record) (if (,pred record) (record-ref record ',field-name) - (error "wrong record type"))) + (error (string-append (symbol->string ',accessor) ": wrong record type") record))) `(begin (define (,accessor record) (if (,pred record) (record-ref record ',field-name) - (error "wrong record type"))) + (error (string-append (symbol->string ',accessor) ": wrong record type") record))) (define (,(car modifier?) record val) (if (,pred record) (record-set! record ',field-name val) - (error "wrong record type"))))))))) + (error (string-append (symbol->string ',(car modifier?)) ": wrong record type") record))))))))) (define-syntax define-record-type (ir-macro-transformer