summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2010-02-28 20:12:45 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2010-02-28 20:12:45 (GMT)
commit294846060a28508a5a5c4d42a5b1dd7770b7f4c7 (patch)
treea493cad4f37678def8878fdb8492da28dc999238 /generic
parent51d18971aabe6812540c7f9220ef39ec630ac6ba (diff)
downloadtcl-294846060a28508a5a5c4d42a5b1dd7770b7f4c7.zip
tcl-294846060a28508a5a5c4d42a5b1dd7770b7f4c7.tar.gz
tcl-294846060a28508a5a5c4d42a5b1dd7770b7f4c7.tar.bz2
More additions of {TCL LOOKUP} error-code generation to various subcommands of
[info] as part of long-term project to classify all Tcl's generated errors.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclCmdIL.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index fff4e14..2a4a260 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -16,7 +16,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdIL.c,v 1.177 2010/02/24 10:45:04 dkf Exp $
+ * RCS: @(#) $Id: tclCmdIL.c,v 1.178 2010/02/28 20:12:48 dkf Exp $
*/
#include "tclInt.h"
@@ -487,6 +487,7 @@ InfoArgsCmd(
procPtr = TclFindProc(iPtr, name);
if (procPtr == NULL) {
Tcl_AppendResult(interp, "\"", name, "\" isn't a procedure", NULL);
+ Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "PROCEDURE", name, NULL);
return TCL_ERROR;
}
@@ -547,6 +548,7 @@ InfoBodyCmd(
procPtr = TclFindProc(iPtr, name);
if (procPtr == NULL) {
Tcl_AppendResult(interp, "\"", name, "\" isn't a procedure", NULL);
+ Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "PROCEDURE", name, NULL);
return TCL_ERROR;
}
@@ -975,6 +977,7 @@ InfoDefaultCmd(
procPtr = TclFindProc(iPtr, procName);
if (procPtr == NULL) {
Tcl_AppendResult(interp, "\"", procName, "\" isn't a procedure",NULL);
+ Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "PROCEDURE", name, NULL);
return TCL_ERROR;
}
@@ -1005,6 +1008,7 @@ InfoDefaultCmd(
Tcl_AppendResult(interp, "procedure \"", procName,
"\" doesn't have an argument \"", argName, "\"", NULL);
+ Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARGUMENT", argName, NULL);
return TCL_ERROR;
defStoreError:
@@ -1128,6 +1132,8 @@ InfoFrameCmd(
levelError:
Tcl_AppendResult(interp, "bad level \"", TclGetString(objv[1]), "\"",
NULL);
+ Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "STACK_FRAME",
+ TclGetString(obj[1]), NULL);
return TCL_ERROR;
}
@@ -1523,6 +1529,8 @@ InfoLevelCmd(
levelError:
Tcl_AppendResult(interp, "bad level \"", TclGetString(objv[1]), "\"",
NULL);
+ Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "STACK_LEVEL",
+ TclGetString(objv[1]), NULL);
return TCL_ERROR;
}