From: SourceForge.net <no...@so...> - 2013-04-08 20:08:17
|
Bugs item #2502002, was opened at 2009-01-12 10:01 Message generated for change (Comment added) made by dgp You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=2502002&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 45. Parsing and Eval Group: obsolete: 8.6b1 Status: Open Resolution: None Priority: 7 Private: No Submitted By: Don Porter (dgp) Assigned to: miguel sofer (msofer) Summary: Tcl_NRCmdSwap prevents exception handling Initial Comment: When Tcl_NRCmdSwap() is called, there is no call to TEOV_PushExceptionHandlers(), so no handling of toplevel exception and no appending to -errorinfo when TCL_ERROR arises. This seems to be the right feature set for [namespace import]ed commands, which is the sole Tcl_NRCmdSwap() caller in our sources. It's less clear that other T_NRCS() callers want the same thing. At least the docs need to be clearer about it. ---------------------------------------------------------------------- >Comment By: Don Porter (dgp) Date: 2013-04-08 13:08 Message: See branch bug-2502002 for work in progress. ---------------------------------------------------------------------- Comment By: miguel sofer (msofer) Date: 2013-03-19 06:52 Message: dgp's proposed solution sounds good. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2013-03-19 06:35 Message: status? ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2009-01-12 20:21 Message: when I first filed, I assumed miguel was still incommunicado, and also assumed this was basically a docs bug. Neither is turning out to be completely true. ---------------------------------------------------------------------- Comment By: Kevin B KENNY (kennykb) Date: 2009-01-12 17:19 Message: Is there a reason this is assigned to me? I committed the NRE documentation while miguel was _hors de combat_, but I think he'd be a better choice to examine it first. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2009-01-12 13:53 Message: If TclNREvalObjv() were revised so that a T_NCRS() call still tried a TEOV_PEH() call before skipping the command resolution stuff, then InvokeImportedCmd() could still run exactly as it does now by just passing the TCL_EVAL_NOERR flag, and TOI could use the same routine not passing it. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2009-01-12 13:41 Message: Thanks for commenting miguel. The matter arises as I look into Tcl Bug 2486550. TclObjInvoke() directly calls a cmdPtr->objProc just like the InvokeImportedCmd() used to do. Since T_NCRS() solved one, it's a candidate to solve the other as well. But TOI does include code to append to the -errorinfo . ---------------------------------------------------------------------- Comment By: miguel sofer (msofer) Date: 2009-01-12 11:50 Message: I call a possible doc bug: T_NCRS is meant to do precisely what imports do, replace the original command with a new one. In particular, the swap should not add new exception handlers - exceptions are treated only by the original command, not by the replacement. If both the original and the replacement commands are meant to handle exceptions the proper approach is to mimic what aliases do: eval a new objc/objv. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=2502002&group_id=10894 |