From 2c185d8d80caff9726ff560e3f3fc9fbf630c77e Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 26 May 2022 21:49:12 -0700 Subject: open-file: show function name in bad modes diagnostic. * stream.c (normalize_mode): Include the self symbol in the error message being thrown. This was not forgotten in the sister function normalize_mode_no_bin. --- stream.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stream.c b/stream.c index 621316e1..b5105b44 100644 --- a/stream.c +++ b/stream.c @@ -1634,7 +1634,8 @@ val normalize_mode(struct stdio_mode *m, val mode_str, struct stdio_mode m_dfl, *m = do_parse_mode(mode_str, m_dfl, self); if (m->malformed) - uw_throwf(file_error_s, lit("invalid file open mode ~s"), mode_str, nao); + uw_throwf(file_error_s, lit("~a: invalid file open mode ~s"), + self, mode_str, nao); return format_mode(*m); } -- cgit v1.2.3