From 294846060a28508a5a5c4d42a5b1dd7770b7f4c7 Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 28 Feb 2010 20:12:45 +0000 Subject: 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. --- ChangeLog | 8 +++++++- generic/tclCmdIL.c | 10 +++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 26a2a31..33f1ba4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,12 @@ +2010-02-28 Donal K. Fellows + + * generic/tclCmdIL.c: 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. + 2010-02-28 Jan Nijtmans - * generic/tclStubInit.c Fix Bug #2959713: Link error with gcc 4.1 + * generic/tclStubInit.c: [Bug 2959713]: Link error with gcc 4.1 2010-02-27 Donal K. Fellows 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; } -- cgit v0.12