Skip to content
Tcl Source Code History Of Ticket 218685
Login

History Of Ticket 218685

Artifacts Associated With Ticket 218685

  1. Ticket change [7725b911a4] (rid 89728) by nobody on 2000-10-26 01:04:07:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. 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
      
    4. foundin initialized to: "obsolete: 8.1b2"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "56. LibTomMath"
    10. title initialized to: "auto_load errors: don't prune errorInfo"
    11. type initialized to: "Bug"
  2. Ticket change [5df8aa05b4] (rid 115557) by welch on 2000-10-26 08:27:10:

    1. closedate changed to: "2000-10-26T01:27:10"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  3. Ticket change [6fddb0e3e2] (rid 100385) by dgp on 2001-04-06 02:08:30:

    1. closedate changed to: "2001-04-05T19:08:30"
    2. closer changed to: "dgp"
    3. subsystem changed to: "38. Init - Library - Autoload"