diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-04-13 23:36:04 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-04-13 23:36:04 -0700 |
commit | 89fec3500c98572f1439aa7010100ef2c1214095 (patch) | |
tree | 42a0adb9efb64d1c30ed6afaf7ff18184858437e | |
parent | 155390d6bbd514fe318b2fafc64f75762a73fab3 (diff) | |
download | txr-89fec3500c98572f1439aa7010100ef2c1214095.tar.gz txr-89fec3500c98572f1439aa7010100ef2c1214095.tar.bz2 txr-89fec3500c98572f1439aa7010100ef2c1214095.zip |
streams: fix reversed order of items in error diagnostic.
* stream.c (stdio_maybe_error): We want to say "error
whatever-ing #<stream ....>": the action has to come first,
and from the format specifiers being ~a ~s, that was clearly
the intent.
-rw-r--r-- | stream.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -573,14 +573,14 @@ static val stdio_maybe_error(val stream, val action) struct stdio_handle *h = coerce(struct stdio_handle *, stream->co.handle); val err = num(errno); if (h->f == 0) - uw_throwf(file_error_s, lit("error ~a ~s: file closed"), stream, action, nao); + uw_throwf(file_error_s, lit("error ~a ~s: file closed"), action, stream, nao); h->err = err; #ifdef EAGAIN if (errno == EAGAIN) uw_throwf(timeout_error_s, lit("timed out on ~s"), stream, nao); #endif uw_throwf(file_error_s, lit("error ~a ~s: ~d/~s"), - stream, action, err, errno_to_string(err), nao); + action, stream, err, errno_to_string(err), nao); } static int se_putc(int ch, FILE *f) |