summaryrefslogtreecommitdiffstats
path: root/generic/tkConsole.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-08-27 19:48:23 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-08-27 19:48:23 (GMT)
commit55ad282f48e04748a7cf3d375ad3fc2abb47c0a1 (patch)
treec8cd1c66faa65fac8be9a9a85c0fc3ba7b8a564f /generic/tkConsole.c
parentbd27ced6025b5ce285080806ecd44c8b9bc1786a (diff)
parentef65c6ff80f269b8e94aa1ff98e76831b93c4550 (diff)
downloadtk-55ad282f48e04748a7cf3d375ad3fc2abb47c0a1.zip
tk-55ad282f48e04748a7cf3d375ad3fc2abb47c0a1.tar.gz
tk-55ad282f48e04748a7cf3d375ad3fc2abb47c0a1.tar.bz2
Generate -errorcode values to go with errors. Generate messages and postscript
using Tcl_Obj API, not the string result API.
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;
}