Index: generic/nsf.c =================================================================== diff -u -rce6d76dc0353274665973facb2546678bc7ebd92 -r3ffcbc1b5cf21f850b3dd486f9aa48c93f08e7a8 --- generic/nsf.c (.../nsf.c) (revision ce6d76dc0353274665973facb2546678bc7ebd92) +++ generic/nsf.c (.../nsf.c) (revision 3ffcbc1b5cf21f850b3dd486f9aa48c93f08e7a8) @@ -21007,7 +21007,8 @@ if (unlikely(currentParamPtr > lastParamPtr)) { return NsfUnexpectedArgumentError(interp, ObjStr(argumentObj), - (Nsf_Object*)object, paramPtr, procNameObj); + (Nsf_Object*)object, paramPtr, + NsfMethodNamePath(interp, NULL /* use topmost frame */, NsfMethodName(procNameObj))); } if (*currentParamPtr->name == '-') { @@ -21117,7 +21118,7 @@ return NsfUnexpectedNonposArgumentError(interp, argumentString, (Nsf_Object *)object, currentParamPtr, paramPtr, - procNameObj); + NsfMethodNamePath(interp, NULL /* use topmost frame */, NsfMethodName(procNameObj))); } pPtr = currentParamPtr = nextParamPtr; } @@ -21172,7 +21173,7 @@ return NsfUnexpectedNonposArgumentError(interp, argumentString, (Nsf_Object *)object, currentParamPtr, paramPtr, - procNameObj); + NsfMethodNamePath(interp, NULL /* use topmost frame */, NsfMethodName(procNameObj))); } pPtr = currentParamPtr = nextParamPtr; } @@ -21191,7 +21192,8 @@ */ if (unlikely(pPtr > lastParamPtr)) { return NsfUnexpectedArgumentError(interp, ObjStr(argumentObj), - (Nsf_Object *)object, paramPtr, procNameObj); + (Nsf_Object *)object, paramPtr, + NsfMethodNamePath(interp, NULL /* use topmost frame */, NsfMethodName(procNameObj))); } Index: generic/nsfError.c =================================================================== diff -u -rcf0a4f3cb9de0734244a53d1d3cbd11531353214 -r3ffcbc1b5cf21f850b3dd486f9aa48c93f08e7a8 --- generic/nsfError.c (.../nsfError.c) (revision cf0a4f3cb9de0734244a53d1d3cbd11531353214) +++ generic/nsfError.c (.../nsfError.c) (revision 3ffcbc1b5cf21f850b3dd486f9aa48c93f08e7a8) @@ -314,21 +314,22 @@ */ int NsfUnexpectedArgumentError(Tcl_Interp *interp, CONST char *argumentString, - Nsf_Object *object, Nsf_Param CONST *paramPtr, Tcl_Obj *procNameObj) { + Nsf_Object *object, Nsf_Param CONST *paramPtr, + Tcl_Obj *methodNamePathObj) { Tcl_DString ds, *dsPtr = &ds; assert(interp); assert(argumentString); assert(paramPtr); - assert(procNameObj); + assert(methodNamePathObj); DSTRING_INIT(dsPtr); Tcl_DStringAppend(dsPtr, "invalid argument '", -1); Tcl_DStringAppend(dsPtr, argumentString, -1); Tcl_DStringAppend(dsPtr, "', maybe too many arguments;", -1); NsfArgumentError(interp, Tcl_DStringValue(dsPtr), paramPtr, object ? object->cmdName : NULL, - NsfMethodNamePath(interp, NULL /* use topmost frame */, NsfMethodName(procNameObj))); + methodNamePathObj); DSTRING_FREE(dsPtr); return TCL_ERROR; } @@ -354,15 +355,15 @@ Nsf_Object *object, Nsf_Param CONST *currentParamPtr, Nsf_Param CONST *paramPtr, - Tcl_Obj *procNameObj) { + Tcl_Obj *methodNamePathObj) { Tcl_DString ds, *dsPtr = &ds; Nsf_Param CONST *pPtr; assert(interp); assert(argumentString); assert(currentParamPtr); assert(paramPtr); - assert(procNameObj); + assert(methodNamePathObj); DSTRING_INIT(dsPtr); Tcl_DStringAppend(dsPtr, "invalid non-positional argument '", -1); @@ -380,7 +381,7 @@ NsfArgumentError(interp, Tcl_DStringValue(dsPtr), paramPtr, object ? object->cmdName : NULL, - NsfMethodNamePath(interp, NULL /* use topmost frame */, NsfMethodName(procNameObj))); + methodNamePathObj); DSTRING_FREE(dsPtr); return TCL_ERROR; }