Artifacts Associated With Ticket 218685ffffffffff
Ticket change [7725b911a4] (rid 89728) by nobody on 2000-10-26 01:04:07:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 1734 RFE Version: 8.1b2 SubmitDate: '1999-04-06' LastModified: '2000-02-01' Severity: MED Status: Released Submitter: pat ChangedBy: ericm OS: All FixedDate: '2000-02-01' FixedInVersion: 8.3 ClosedDate: '2000-10-25' Name: Don Porter Comments: The same mis-feature is present in the 8.0.x sources. If this patch is adopted, please apply it to both development branches. DesiredBehavior: When an error occurs in the auto-loading of a command, [unknown] catches and re-raises the error. In the process, all details of the calling stack trace are lost. This can make it difficult to locate the cause of the error when debugging auto-load scripts. [unknown] also prepends the string "error while autoloading \"$name\": " to the error message. This information says something about the context in which the error was raised, nothing about the error itself. The proper place to record context information about an error is in the global errorInfo variable. When several auto-loads get nested, the prepended strings add up to create a long confusing line before getting to the point : what the error is. The simple patch provided corrects both problems by preserving $errorInfo when re-raising the error, and appending to errorInfo the contextual information that the error occured while autoloading. Patch: Index: init.tcl =================================================================== RCS file: /cvsroot/tcl/library/init.tcl,v retrieving revision 1.1.2.7 diff -c -r1.1.2.7 init.tcl *** init.tcl 1999/03/13 23:49:48 1.1.2.7 --- init.tcl 1999/04/06 15:50:08 *************** *** 183,190 **** set ret [catch {auto_load $name [uplevel 1 {namespace current}]} msg] unset unknown_pending($name); if {$ret != 0} { ! return -code $ret -errorcode $errorCode \ ! "error while autoloading \"$name\": $msg" } if {![array size unknown_pending]} { unset unknown_pending --- 183,190 ---- set ret [catch {auto_load $name [uplevel 1 {namespace current}]} msg] unset unknown_pending($name); if {$ret != 0} { ! append errorInfo "\n (autoloading \"$name\")" ! return -code $ret -errorcode $errorCode -errorinfo $errorInfo $msg } if {![array size unknown_pending]} { unset unknown_pending PatchFiles: init.tcl I applied this patch to the 8.3 final sources. Thanks. - eric -- 02/01/2000 ericm - foundin initialized to: "obsolete: 8.1b2"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "56. LibTomMath"
- title initialized to: "auto_load errors: don't prune errorInfo"
- type initialized to: "Bug"
Ticket change [5df8aa05b4] (rid 115557) by welch on 2000-10-26 08:27:10:
- closedate changed to: "2000-10-26T01:27:10"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [6fddb0e3e2] (rid 100385) by dgp on 2001-04-06 02:08:30:
- closedate changed to: "2001-04-05T19:08:30"
- closer changed to: "dgp"
- subsystem changed to: "38. Init - Library - Autoload"