summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2016-06-22 20:58:14 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2016-06-22 20:58:14 (GMT)
commit50e97b06460f3feb7d2d8f9385441112c513d55d (patch)
tree152b7e124433cb9843dc5e0eeacb07190a2b6b8b
parentf26610cd68a05e3e665dcd0fb29fc8e20326fbfe (diff)
parent23df0f8727cefc64cb5b4a6c7a3af518d16fbd7c (diff)
downloadtcl-50e97b06460f3feb7d2d8f9385441112c513d55d.zip
tcl-50e97b06460f3feb7d2d8f9385441112c513d55d.tar.gz
tcl-50e97b06460f3feb7d2d8f9385441112c513d55d.tar.bz2
[c95b9fc0e3] Make errorcodes out of level parsing more consistent.
-rw-r--r--generic/tclCmdIL.c4
-rw-r--r--generic/tclProc.c2
-rw-r--r--generic/tclVar.c3
3 files changed, 5 insertions, 4 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index 0d35397..c93e593 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -1203,7 +1203,7 @@ InfoFrameCmd(
levelError:
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"bad level \"%s\"", TclGetString(objv[1])));
- Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "STACK_FRAME",
+ Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LEVEL",
TclGetString(objv[1]), NULL);
code = TCL_ERROR;
goto done;
@@ -1638,7 +1638,7 @@ InfoLevelCmd(
levelError:
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"bad level \"%s\"", TclGetString(objv[1])));
- Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "STACK_LEVEL",
+ Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LEVEL",
TclGetString(objv[1]), NULL);
return TCL_ERROR;
}
diff --git a/generic/tclProc.c b/generic/tclProc.c
index 172b860..e8c5955 100644
--- a/generic/tclProc.c
+++ b/generic/tclProc.c
@@ -870,7 +870,7 @@ TclObjGetFrame(
}
Tcl_SetObjResult(interp, Tcl_ObjPrintf("bad level \"%s\"", name));
- Tcl_SetErrorCode(interp, "TCL", "VALUE", "STACKLEVEL", NULL);
+ Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LEVEL", name, NULL);
return -1;
}
diff --git a/generic/tclVar.c b/generic/tclVar.c
index b5b5b10..dc7fa20 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -4921,7 +4921,8 @@ Tcl_UpvarObjCmd(
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"bad level \"%s\"", TclGetString(levelObj)));
- Tcl_SetErrorCode(interp, "TCL", "VALUE", "LEVEL", NULL);
+ Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LEVEL",
+ TclGetString(levelObj), NULL);
return TCL_ERROR;
}