From: SourceForge.net <no...@so...> - 2008-10-02 16:47:31
|
Bugs item #2141271, was opened at 2008-10-01 15:43 Message generated for change (Comment added) made by yurivict You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=2141271&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: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Yuri (yurivict) Assigned to: Don Porter (dgp) Summary: Tcl_ParseCommand doesn't set errorInfo for a wrong command Initial Comment: Please compile and run an attached .c file. When run it prints an empty errorInfo obtained after a particular wrong command. errorInfo should *always* be set if Tcl_ParseCommand returns and error. ---------------------------------------------------------------------- >Comment By: Yuri (yurivict) Date: 2008-10-02 09:47 Message: This is quite confusing that there are so many error message variables. ---------------------------------------------------------------------- Comment By: Yuri (yurivict) Date: 2008-10-02 09:35 Message: I see this problem in both tcl-8.4.19 and tcl-8.5.4 with a minor difference. In tcl-8.4.19 errorInfo is returned as an empty string and in tcl-8.5.4 -- as a null string. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2008-10-02 09:31 Message: Use const char *msg = Tcl_GetStringResult(interp); to fix your code. If you also want ::errorInfo set, you can achieve that by adding Tcl_AddErrorInfo(interp,"") in the branch that handles the TCL_ERROR return values. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2008-10-02 09:29 Message: See the docs for Tcl_ParseCommand: "If an error occurred in parsing the command then TCL_ERROR is returned, an error message is left in interps result, and no information is left at *parsePtr." You will find the error message in the interp result, not in the ::errorInfo variable. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2008-10-02 08:57 Message: Please report the version of Tcl in which you see the problem. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=2141271&group_id=10894 |