Overview
| Artifact ID: | 96fe0fe695256091250b50aaf0e07810c84c3fa9 |
|---|---|
| Ticket: | 010f4162efb3bb6546ef904784a13c3c1a615228
Restored trace errors => stammering errorstacks |
| User & Date: | ferrieux on 2013-09-01 00:56:32 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
Commit [30b7b8d858] "Fix bug #2438181: Incorrect error reporting in traces" leads to the following "stammering errorstack", where an Enter-traced proc fails to appear as a CALL level; instead, its caller's level is repeated: proc foo args {} proc goo {} foo trace add execution foo enter {error bar;#} catch goo m d puts [dict get $d -errorstack] => INNER {error bar} CALL goo CALL goo Prior to this commit one would get INNER {invokeStk1 foo} CALL goo which avoided the problem by completely hiding the trace's error. The problem here is that TclLogCommandInfo (which powers the construction of the error stack), called in TEBC after each error, is now also called for the trace's error, thus adding a level; but since we are in an Enter trace, we have not yet updated the interp, which is still essentially in "goo". Note that the command string passed to TclLogCommandInfo does contain "foo", hence ::errorInfo in this case is (accidentally) more accurate: bar while executing "error bar" invoked from within "foo" (procedure "goo" line 1) invoked from within "goo" Bottom line: we'd need to - either give a better sync of command string and interp state - or provide TclLogCommandInfo with a way of detecting this situation to skip the extra level - foundin changed to: "30b7b8d858"
- is_private changed to: "0"
- login: "ferrieux"
- priority changed to: "5 Medium"
- private_contact changed to: "052878a4be90f52d390c8022e271c0c1885d5c80"
- resolution changed to: "None"
- severity changed to: "Severe"
- status changed to: "Open"
- submitter changed to: "ferrieux"
- subsystem changed to: "46. Traces"
- title changed to: "Restored trace errors => stammering errorstacks"
- type changed to: "Bug"