diff options
| author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-09-04 21:35:21 (GMT) |
|---|---|---|
| committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-09-04 21:35:21 (GMT) |
| commit | a50dcb923a50640e31a433c872caa63630d8202d (patch) | |
| tree | b5db0420431479a99a1a92ade263f2d177ff1e7f /win/tclWinChan.c | |
| parent | 25925f6f8e072a0bc3cf719c7684eff79f96ed8f (diff) | |
| parent | 4c8d436cd9e92ed6a304fed697f233ecb7996635 (diff) | |
| download | tcl-a50dcb923a50640e31a433c872caa63630d8202d.zip tcl-a50dcb923a50640e31a433c872caa63630d8202d.tar.gz tcl-a50dcb923a50640e31a433c872caa63630d8202d.tar.bz2 | |
merge trunk
Diffstat (limited to 'win/tclWinChan.c')
| -rw-r--r-- | win/tclWinChan.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/win/tclWinChan.c b/win/tclWinChan.c index 517aa20..52b9e32 100644 --- a/win/tclWinChan.c +++ b/win/tclWinChan.c @@ -940,8 +940,9 @@ TclpOpenFileChannel( } TclWinConvertError(err); if (interp != (Tcl_Interp *) NULL) { - Tcl_AppendResult(interp, "couldn't open \"", TclGetString(pathPtr), - "\": ", Tcl_PosixError(interp), NULL); + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "couldn't open \"%s\": %s", + TclGetString(pathPtr), Tcl_PosixError(interp))); } return NULL; } @@ -959,9 +960,9 @@ TclpOpenFileChannel( if (handle == INVALID_HANDLE_VALUE) { TclWinConvertError(GetLastError()); if (interp != (Tcl_Interp *) NULL) { - Tcl_AppendResult(interp, "couldn't reopen serial \"", - TclGetString(pathPtr), "\": ", - Tcl_PosixError(interp), NULL); + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "couldn't reopen serial \"%s\": %s", + TclGetString(pathPtr), Tcl_PosixError(interp))); } return NULL; } @@ -995,8 +996,9 @@ TclpOpenFileChannel( */ channel = NULL; - Tcl_AppendResult(interp, "couldn't open \"", TclGetString(pathPtr), - "\": bad file type", NULL); + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "couldn't open \"%s\": bad file type", + TclGetString(pathPtr))); Tcl_SetErrorCode(interp, "TCL", "VALUE", "CHANNEL", "BAD_TYPE", NULL); break; |
