summaryrefslogtreecommitdiffstats
path: root/generic/tclOOStubLib.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-08-03 10:56:28 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-08-03 10:56:28 (GMT)
commit4152a1cc08547b251509c18405d318433f5ece2e (patch)
tree75be1366adc438a7d2ef0f75fc7c2ffe414d7872 /generic/tclOOStubLib.c
parent3546e128c0c379f71d6fdf6678ad19cd9d0a0265 (diff)
downloadtcl-4152a1cc08547b251509c18405d318433f5ece2e.zip
tcl-4152a1cc08547b251509c18405d318433f5ece2e.tar.gz
tcl-4152a1cc08547b251509c18405d318433f5ece2e.tar.bz2
converting to using Tcl_Obj API for error message generation; part done
Diffstat (limited to 'generic/tclOOStubLib.c')
-rw-r--r--generic/tclOOStubLib.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/generic/tclOOStubLib.c b/generic/tclOOStubLib.c
index 3b6ce37..55f2378 100644
--- a/generic/tclOOStubLib.c
+++ b/generic/tclOOStubLib.c
@@ -53,8 +53,9 @@ TclOOInitializeStubs(
if (clientData == NULL) {
Tcl_ResetResult(interp);
- Tcl_AppendResult(interp, "Error loading ", packageName, " package; ",
- "package not present or incomplete", NULL);
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "error loading %s package; package not present or incomplete",
+ packageName));
return NULL;
} else {
const TclOOStubs * const stubsPtr = clientData;
@@ -76,9 +77,9 @@ TclOOInitializeStubs(
error:
Tcl_ResetResult(interp);
- Tcl_AppendResult(interp, "Error loading ", packageName, " package",
- " (requested version '", version, "', loaded version '",
- actualVersion, "'): ", errMsg, NULL);
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf("Error loading %s package"
+ " (requested version '%s', loaded version '%s'): %s",
+ packageName, version, actualVersion, errMsg));
return NULL;
}
}