summaryrefslogtreecommitdiffstats
path: root/generic/tclDictObj.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2010-07-15 21:00:25 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2010-07-15 21:00:25 (GMT)
commit83badefdb71b863f0580d1ee3d6270c5102ba3d9 (patch)
tree6b04ba25316f8d4a973365fa0f061d7d270ff626 /generic/tclDictObj.c
parent7abfdd1acbbaf999810374d70a5b9423b898fb00 (diff)
downloadtcl-83badefdb71b863f0580d1ee3d6270c5102ba3d9.zip
tcl-83badefdb71b863f0580d1ee3d6270c5102ba3d9.tar.gz
tcl-83badefdb71b863f0580d1ee3d6270c5102ba3d9.tar.bz2
* generic/tclExecute.c (TclExecuteByteCode): Ensure that [dict get]
* generic/tclDictObj.c (DictGetCmd): always generates an errorCode on a failure to look up an entry.
Diffstat (limited to 'generic/tclDictObj.c')
-rw-r--r--generic/tclDictObj.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c
index e0aea5b..a2a8dd0 100644
--- a/generic/tclDictObj.c
+++ b/generic/tclDictObj.c
@@ -4,12 +4,12 @@
* This file contains functions that implement the Tcl dict object type
* and its accessor command.
*
- * Copyright (c) 2002 by Donal K. Fellows.
+ * Copyright (c) 2002-2010 by Donal K. Fellows.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclDictObj.c,v 1.82 2010/03/05 14:34:04 dkf Exp $
+ * RCS: @(#) $Id: tclDictObj.c,v 1.83 2010/07/15 21:00:26 dkf Exp $
*/
#include "tclInt.h"
@@ -1621,6 +1621,8 @@ DictGetCmd(
Tcl_ResetResult(interp);
Tcl_AppendResult(interp, "key \"", TclGetString(objv[objc-1]),
"\" not known in dictionary", NULL);
+ Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "DICT",
+ TclGetString(objv[objc-1]), NULL);
return TCL_ERROR;
}
Tcl_SetObjResult(interp, valuePtr);