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 | 8b939b74f8a4c8617410768e840ab04abbaec043 (patch) | |
tree | 10c44c90c1cf69d582b7527dd0db599175b1319d | |
parent | e992537340b8e22c74bdb445d925944b55801e87 (diff) | |
download | tcl-8b939b74f8a4c8617410768e840ab04abbaec043.zip tcl-8b939b74f8a4c8617410768e840ab04abbaec043.tar.gz tcl-8b939b74f8a4c8617410768e840ab04abbaec043.tar.bz2 |
Make sure MoveBytes error reporting reproduces what CopyData does. Bugward compatibility!
-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; } |