From e10cd2e0a52b97a25e6e05658f8f96b2f53bf45c Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 19 Dec 2017 20:48:52 +0000 Subject: [586e71dce4] Exeception handling at level #0 by EvalObjv --- generic/tclBasic.c | 2 +- tests/basic.test | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 79de61e..ddc828a 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -4561,7 +4561,7 @@ TEOV_Exception( if (result == TCL_RETURN) { result = TclUpdateReturnInfo(iPtr); } - if ((result != TCL_ERROR) && !allowExceptions) { + if ((result != TCL_OK) && (result != TCL_ERROR) && !allowExceptions) { ProcessUnexpectedResult(interp, result); result = TCL_ERROR; } diff --git a/tests/basic.test b/tests/basic.test index 7ff0669..865814a 100644 --- a/tests/basic.test +++ b/tests/basic.test @@ -984,6 +984,16 @@ test basic-49.2 {Tcl_EvalEx: verify TCL_EVAL_GLOBAL operation} testevalex { set ::context } {global} +test basic-50.1 {[586e71dce4] EvalObjv level #0 exception handling} -setup { + interp create slave + interp alias {} foo slave return +} -body { + list [catch foo m] $m +} -cleanup { + unset -nocomplain m + interp delete slave +} -result {0 {}} + # Clean up after expand tests unset noComp l1 l2 constraints rename l3 {} -- cgit v0.12