summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp@users.sourceforge.net <dgp>2014-07-24 15:24:11 (GMT)
committerdgp@users.sourceforge.net <dgp>2014-07-24 15:24:11 (GMT)
commite9979725d6fd6d0767cc797e257042a9275a1d2c (patch)
tree10c44c90c1cf69d582b7527dd0db599175b1319d
parent8ea7c24e104d5221c459b6bcaef800fbfdc37764 (diff)
downloadtcl-e9979725d6fd6d0767cc797e257042a9275a1d2c.zip
tcl-e9979725d6fd6d0767cc797e257042a9275a1d2c.tar.gz
tcl-e9979725d6fd6d0767cc797e257042a9275a1d2c.tar.bz2
Make sure MoveBytes error reporting reproduces what CopyData does. Bugward compatibility!
-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;
}