(define error-msgs '((en-us . ((no-node . "Error: please check if source and destination nodes exist.\n"))) (pt-br . ((no-node . "Erro: por favor verifique se os nós de origem e de destino existem.\n"))))) (define (report-error error-symbol #!optional (lang 'en-us)) (cdr (assoc error-symbol (cdr (assoc lang error-msgs))))) ---------------------------------------------- #;69> (report-error 'no-node) "Error: please check if source and destination nodes exist.\n" #;70> (report-error 'no-node lang: 'en-us) Error: (cdr) bad argument type: #f Call history: (report-error (quote no-node) lang: (quote en-us)) (quote no-node) (##core#quote no-node) (quote en-us) (##core#quote en-us) (report-error (quote no-node) lang: (quote en-us)) [report-error] (null?437 tmp436) [report-error] (car438 tmp436) [report-error] (cdr (assoc error-symbol (cdr (assoc lang error-msgs)))) [report-error] (assoc error-symbol (cdr (assoc lang error-msgs))) [report-error] (cdr (assoc lang error-msgs)) [report-error] (assoc lang error-msgs) <--