diff options
author | msofer <msofer@noemail.net> | 2002-03-27 14:35:39 (GMT) |
---|---|---|
committer | msofer <msofer@noemail.net> | 2002-03-27 14:35:39 (GMT) |
commit | a75a62e2e11914c17fe8100c13975bd0e9703daf (patch) | |
tree | fb25550d63d8991150f460cf93bd1a4df7b4e854 /generic | |
parent | 24b3ed1c762524fc432604b967d135f0a155335b (diff) | |
download | tcl-a75a62e2e11914c17fe8100c13975bd0e9703daf.zip tcl-a75a62e2e11914c17fe8100c13975bd0e9703daf.tar.gz tcl-a75a62e2e11914c17fe8100c13975bd0e9703daf.tar.bz2 |
avoid exceptional returns at level 0 [Bug 219181]
FossilOrigin-Name: b268ff19148212477a893cbc8f594da1873c96d7
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclBasic.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 3f4c5d6..5a4424b 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.53 2002/03/25 16:35:14 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.54 2002/03/27 14:35:40 msofer Exp $ */ #include "tclInt.h" @@ -3585,6 +3585,16 @@ Tcl_EvalEx(interp, script, numBytes, flags) iPtr->numLevels--; } if (code != TCL_OK) { + if (iPtr->numLevels == 0) { + if (code == TCL_RETURN) { + code = TclUpdateReturnInfo(iPtr); + } + if ((code != TCL_OK) && (code != TCL_ERROR) + && ((iPtr->evalFlags & TCL_ALLOW_EXCEPTIONS) == 0)) { + ProcessUnexpectedResult(interp, code); + code = TCL_ERROR; + } + } goto error; } for (i = 0; i < objectsUsed; i++) { |