Overview
| Artifact ID: | 5ec0f4af87e08b216f208dc8b84470af44b1257b |
|---|---|
| Ticket: | 2868499fffffffffffffffffffffffffffffffff
TIP #348: Substituted errorStack |
| User & Date: | dgp on 2010-03-25 03:45:34 |
Changes
- icomment:
There remains an offset in the timing of appends to -errorinfo and -errorstack: proc myEval script { if {[catch {uplevel 1 $script} m o] == 1} { puts EI:[dict get $o -errorinfo]\n puts ES:[dict get $o -errorstack] } } proc foo {} {error bar} myEval foo OUTPUT: EI:bar while executing "error bar" (procedure "foo" line 1) invoked from within "foo" ("uplevel" body line 1) invoked from within "uplevel 1 $script" ES:foo {uplevel 1} {myEval foo} It is clear that the each Tcl_LogCommandInfo call is appending to -errorinfo text related to the commands that have completed their evaluation, while it appends to -errorstack information about the current context which has not yet been terminated. Parallel appends would be less confusing. If -errorstack construction could be changed to match -errorinfo, then the [control::eval] command would already handle -errorstack correctly as written. With the current patch, the [control::eval] command needs to have code added to strip a final {uplevel 1} from the -errorstack to fully disguise the wrapping replacement. The analogous issue would impact [control::ascaller] too. - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"