summaryrefslogtreecommitdiffstats
path: root/generic/tkConsole.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-07-23 13:59:40 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-07-23 13:59:40 (GMT)
commit571fd220b0be2da05b1a6e8bb32e0b9a447ed288 (patch)
tree46a3064598e4a36c7ca561f9c08f5d22de4b2b9e /generic/tkConsole.c
parented7fb54396eee6e5122bfe611b2a14cf422970fa (diff)
downloadtk-571fd220b0be2da05b1a6e8bb32e0b9a447ed288.zip
tk-571fd220b0be2da05b1a6e8bb32e0b9a447ed288.tar.gz
tk-571fd220b0be2da05b1a6e8bb32e0b9a447ed288.tar.bz2
Much more cleaning up of result handling.
Diffstat (limited to 'generic/tkConsole.c')
-rw-r--r--generic/tkConsole.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/generic/tkConsole.c b/generic/tkConsole.c
index 53f49c1..434350a 100644
--- a/generic/tkConsole.c
+++ b/generic/tkConsole.c
@@ -747,7 +747,9 @@ ConsoleObjCmd(
Tcl_SetObjResult(interp, Tcl_GetObjResult(consoleInterp));
Tcl_Release(consoleInterp);
} else {
- Tcl_AppendResult(interp, "no active console interp", NULL);
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(
+ "no active console interp", -1));
+ Tcl_SetErrorCode(interp, "TK", "CONSOLE", "NONE", NULL);
result = TCL_ERROR;
}
Tcl_DecrRefCount(cmd);
@@ -796,7 +798,9 @@ InterpreterObjCmd(
}
if ((otherInterp == NULL) || Tcl_InterpDeleted(otherInterp)) {
- Tcl_AppendResult(interp, "no active master interp", NULL);
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(
+ "no active master interp", -1));
+ Tcl_SetErrorCode(interp, "TK", "CONSOLE", "NO_INTERP", NULL);
return TCL_ERROR;
}