diff options
| author | donal.k.fellows@manchester.ac.uk <dkf> | 2011-08-05 15:23:55 (GMT) |
|---|---|---|
| committer | donal.k.fellows@manchester.ac.uk <dkf> | 2011-08-05 15:23:55 (GMT) |
| commit | 33cff6e3a9f7dd0e89384f7aa9d2d99e270a837b (patch) | |
| tree | 8d196c86a7bd506d332c9e4b0da126e6f2ed45fd /generic/tclIO.c | |
| parent | 26afde2c7945fd64334525c75db2921a6ac8e1c9 (diff) | |
| download | tcl-33cff6e3a9f7dd0e89384f7aa9d2d99e270a837b.zip tcl-33cff6e3a9f7dd0e89384f7aa9d2d99e270a837b.tar.gz tcl-33cff6e3a9f7dd0e89384f7aa9d2d99e270a837b.tar.bz2 | |
Use Tcl_PrintfObj to generate more (complex) error messages.
Diffstat (limited to 'generic/tclIO.c')
| -rw-r--r-- | generic/tclIO.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index c7fab6c..78c1dc0 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -2095,12 +2095,9 @@ Tcl_GetChannelHandle( chanPtr = ((Channel *) chan)->state->bottomChanPtr; if (!chanPtr->typePtr->getHandleProc) { - Tcl_Obj *err; - - TclNewLiteralStringObj(err, "channel \""); - Tcl_AppendToObj(err, Tcl_GetChannelName(chan), -1); - Tcl_AppendToObj(err, "\" does not support OS handles", -1); - Tcl_SetChannelError(chan, err); + Tcl_SetChannelError(chan, Tcl_ObjPrintf( + "channel \"%s\" does not support OS handles", + Tcl_GetChannelName(chan))); return TCL_ERROR; } result = chanPtr->typePtr->getHandleProc(chanPtr->instanceData, direction, |
