diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2006-09-01 10:40:22 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2006-09-01 10:40:22 (GMT) |
commit | 892422eb984b0f158a3ee243b520b51d46c0e7a5 (patch) | |
tree | 6d23c5d4ff9652724308847e677f160498cce07a /generic/tclProc.c | |
parent | 0273f53a8215273953b8270a79e9c16f97c126d4 (diff) | |
download | tcl-892422eb984b0f158a3ee243b520b51d46c0e7a5.zip tcl-892422eb984b0f158a3ee243b520b51d46c0e7a5.tar.gz tcl-892422eb984b0f158a3ee243b520b51d46c0e7a5.tar.bz2 |
More tests (all passing), and got rid of the knownBug from all tests.
Diffstat (limited to 'generic/tclProc.c')
-rw-r--r-- | generic/tclProc.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/generic/tclProc.c b/generic/tclProc.c index 4052536..c90f9ed 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclProc.c,v 1.86.2.3 2006/08/20 12:20:20 dkf Exp $
+ * RCS: @(#) $Id: tclProc.c,v 1.86.2.4 2006/09/01 10:40:22 dkf Exp $
*/
#include "tclInt.h"
@@ -1629,13 +1629,25 @@ ProcessProcResultCode( // TODO: incorporate declaring class name
TclFormatToErrorInfo(interp, "\n (destructor line %d)",
interp->errorLine);
+ } else if (isMethod & FRAME_IS_METHOD) {
+ int nameLen;
+ CallContext *contextPtr =
+ ((Interp *) interp)->varFramePtr->ooContextPtr;
+ Tcl_Obj *methodNameObj =
+ contextPtr->callChain[contextPtr->index].mPtr->namePtr;
+ const char *methodName =
+ Tcl_GetStringFromObj(methodNameObj, &nameLen);
+
+ overflow = (nameLen > limit);
+ TclFormatToErrorInfo(interp, "\n (method \"%.*s%s\" line %d)",
+ (overflow ? limit : nameLen), methodName,
+ (overflow ? "..." : ""), interp->errorLine);
} else {
int nameLen;
const char *procName = Tcl_GetStringFromObj(procNameObj, &nameLen);
overflow = (nameLen > limit);
- TclFormatToErrorInfo(interp, "\n (%s \"%.*s%s\" line %d)",
- (isMethod ? "method" : "procedure"),
+ TclFormatToErrorInfo(interp, "\n (procedure \"%.*s%s\" line %d)",
(overflow ? limit : nameLen), procName,
(overflow ? "..." : ""), interp->errorLine);
}
|