Overview
| Artifact ID: | a230871dae9b81828c9256619e75a21e6a7b3cd2 |
|---|---|
| Ticket: | 2038069fffffffffffffffffffffffffffffffff
Too much errorinfo at catch |
| User & Date: | dgp on 2008-08-05 21:13:43 |
Changes
- icomment:
Logged In: YES user_id=80530 Originator: NO To answer the "all ears" request first... TIP 90 includes the following example of how to use Tcl 8.5 features to robustly remove the effects of catch and uplevel from the stack trace of a "wrapper" command: namespace eval control { proc eval script { variable result variable options set code [uplevel 1 \ [list ::catch $script [namespace which -variable result] \ [namespace which -variable options]]] if {$code == 1} { set line [dict get $options -errorline] dict append options -errorinfo \ "\n (\"[lindex [info level 0] 0]\" body line $line)" } dict incr options -level return -options $options $result } } - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"