diff options
author | dgp <dgp@users.sourceforge.net> | 2014-07-24 15:24:11 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-07-24 15:24:11 (GMT) |
commit | 841ecebfa51d8efd3a77ff22cdfec76e4bd7a43b (patch) | |
tree | 10c44c90c1cf69d582b7527dd0db599175b1319d /generic/tclIO.c | |
parent | b3bdbd342bd5c5908791fea90d3ffacc462a5084 (diff) | |
download | tcl-841ecebfa51d8efd3a77ff22cdfec76e4bd7a43b.zip tcl-841ecebfa51d8efd3a77ff22cdfec76e4bd7a43b.tar.gz tcl-841ecebfa51d8efd3a77ff22cdfec76e4bd7a43b.tar.bz2 |
Make sure MoveBytes error reporting reproduces what CopyData does. Bugward compatibility!
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r-- | generic/tclIO.c | 8 |
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; } |