From adaa2f66fec7684e9e65491158afc5923613e3da Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 19 Jun 2020 14:30:05 -0400 Subject: [PATCH] ice-9: exceptions: Properly format the error message. Before this change, native exceptions such as system errors caught with srfi-34's `guard' would be converted to an exception with its message unhelpfully set to "~A". Thus, apply the message arguments to the message format to derive a human readable exception message. * module/ice-9/exceptions.scm (guile-common-exceptions): Format the message string using its arguments. --- module/ice-9/exceptions.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/ice-9/exceptions.scm b/module/ice-9/exceptions.scm index 143e7aa3e..c990790e9 100644 --- a/module/ice-9/exceptions.scm +++ b/module/ice-9/exceptions.scm @@ -189,7 +189,7 @@ ((subr msg margs . _) (make-exception (make-exception-with-origin subr) - (make-exception-with-message msg) + (make-exception-with-message (apply format #f msg margs)) (make-exception-with-irritants margs))) (_ (make-exception-with-irritants args))) args)) -- 2.26.2