diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-05-26 21:49:12 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-05-26 21:49:12 -0700 |
commit | 2c185d8d80caff9726ff560e3f3fc9fbf630c77e (patch) | |
tree | c5accc34f135107e1c3c730ef42986d9a4f058bc /stream.c | |
parent | 538a56daf667a9f5bf14e5e20230b0c0d40199c3 (diff) | |
download | txr-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.
Diffstat (limited to 'stream.c')
-rw-r--r-- | stream.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); } |