summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-05-26 21:49:12 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-05-26 21:49:12 -0700
commit2c185d8d80caff9726ff560e3f3fc9fbf630c77e (patch)
treec5accc34f135107e1c3c730ef42986d9a4f058bc
parent538a56daf667a9f5bf14e5e20230b0c0d40199c3 (diff)
downloadtxr-2c185d8d80caff9726ff560e3f3fc9fbf630c77e.tar.gz
txr-2c185d8d80caff9726ff560e3f3fc9fbf630c77e.tar.bz2
txr-2c185d8d80caff9726ff560e3f3fc9fbf630c77e.zip
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.
-rw-r--r--stream.c3
1 files changed, 2 insertions, 1 deletions
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);
}