summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r--generic/tclIO.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 017494e..7e793a9 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -8920,6 +8920,10 @@ MoveBytes(
* channel, flush them out of the way first. */
if (0 != FlushChannel(csPtr->interp, outStatePtr->topChanPtr, 0)) {
+ Tcl_SetObjResult(csPtr->interp, Tcl_ObjPrintf(
+ "error writing \"%s\": %s",
+ Tcl_GetChannelName((Tcl_Channel)csPtr->writePtr),
+ Tcl_PosixError(csPtr->interp)));
code = TCL_ERROR;
goto done;
}
@@ -8989,6 +8993,10 @@ MoveBytes(
/* Flush destination */
if (0 != FlushChannel(csPtr->interp, outStatePtr->topChanPtr, 0)) {
+ Tcl_SetObjResult(csPtr->interp, Tcl_ObjPrintf(
+ "error writing \"%s\": %s",
+ Tcl_GetChannelName((Tcl_Channel)csPtr->writePtr),
+ Tcl_PosixError(csPtr->interp)));
code = TCL_ERROR;
break;
}