diff options
author | dgp <dgp@users.sourceforge.net> | 2014-07-24 15:02:09 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-07-24 15:02:09 (GMT) |
commit | 97d74c549dd10fe31903f76e25ed9267b2e32388 (patch) | |
tree | 33651e918903430d735b9fc1c5404a3985cae690 | |
parent | 595290e064f0e30af87bbafc555c4908fc9f49a6 (diff) | |
download | tcl-97d74c549dd10fe31903f76e25ed9267b2e32388.zip tcl-97d74c549dd10fe31903f76e25ed9267b2e32388.tar.gz tcl-97d74c549dd10fe31903f76e25ed9267b2e32388.tar.bz2 |
Make sure MoveBytes records read error messages.
-rw-r--r-- | generic/tclIO.c | 6 |
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; } |