summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-07-24 15:02:09 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-07-24 15:02:09 (GMT)
commit97d74c549dd10fe31903f76e25ed9267b2e32388 (patch)
tree33651e918903430d735b9fc1c5404a3985cae690
parent595290e064f0e30af87bbafc555c4908fc9f49a6 (diff)
downloadtcl-97d74c549dd10fe31903f76e25ed9267b2e32388.zip
tcl-97d74c549dd10fe31903f76e25ed9267b2e32388.tar.gz
tcl-97d74c549dd10fe31903f76e25ed9267b2e32388.tar.bz2
Make sure MoveBytes records read error messages.
-rw-r--r--generic/tclIO.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 6718788..017494e 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -8931,9 +8931,13 @@ MoveBytes(
int inBytes = 0;
if (bufPtr == NULL || BytesLeft(bufPtr) == 0) {
- /* Nothing in the input queue; Get more input. */
+ /* Nothing in the input queue; Get more input. */
if (0 != GetInput(inStatePtr->topChanPtr)) {
+ Tcl_SetObjResult(csPtr->interp, Tcl_ObjPrintf(
+ "error reading \"%s\": %s",
+ Tcl_GetChannelName((Tcl_Channel)csPtr->readPtr),
+ Tcl_PosixError(csPtr->interp)));
code = TCL_ERROR;
break;
}