Skip to content
Tcl Source Code History Of Ticket 734402ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 734402ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 734402ffffffffffffffffffffffffffffffffff

  1. Ticket change [c8bf48b73f] (rid 122158) by nobody on 2003-05-08 01:47:32:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      catch [ error "This is an error"]
         Fails to catch to error in tcl 8.4.2.  In tcl 8.3,
      this correctly caught
      the error.  For this simple case, the obvious fix is:
      catch { error "This is an error" }
      However, the difference in behavior affects more
      complex scripts.
      
           -John <[email protected]>
      
    4. foundin initialized to: "None"
    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: "16. Commands A-H"
    10. title initialized to: "catch fails to catch error"
    11. type initialized to: "Bug"
  2. Ticket change [6f624bd878] (rid 100308) by msofer on 2003-05-08 09:28:47:

    1. assignee changed to: "msofer"
    2. closedate changed to: "2003-05-08T02:28:47"
    3. closer changed to: "msofer"
    4. icomment:
      Logged In: YES 
      user_id=148712
      
      The described 8.4.2 behaviour is correct: 
         catch [ error "This is an error"] 
      is semantically equivalent to
         set err [ error "This is an error"] 
         catch $err
      as substitution occurs before the [catch] command is 
      invoked; as substitution raises an error, [catch] is never 
      actually invoked.
      
      Did this really catch the error in 8.3? Could you please post 
      the output of
         info patchlevel
      in the corresponding interpreter?
      
      
    5. login: "msofer"
    6. mimetype: "text/plain"
    7. resolution changed to: "Invalid"
    8. status changed to: "Pending"
    9. username: "msofer"
  3. Ticket change [6fc01fb1f8] (rid 100366) by dgp on 2003-05-08 11:23:47:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      See Bug 219184.  Fixed for Tcl 8.4a3.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. status changed to: "Open"
    5. username: "dgp"
  4. Ticket change [de7ab19aaa] (rid 114856) by msofer on 2003-05-08 19:24:19:

    1. closedate changed to: "2003-05-08T12:24:19"
    2. closer changed to: "msofer"
    3. icomment:
      Logged In: YES 
      user_id=148712
      
      Doh ... I did have a déjà-vu feeling.
      
      
    4. login: "msofer"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
    7. username: "msofer"
  5. Ticket change [5636689a5e] (rid 94281) by nobody on 2003-05-12 08:01:15:

    1. icomment:
      Logged In: NO 
      
      
        The behavior may be correct, but the man page for "catch"
      does not indicate any distinction between "catch [ error ]" and 
      "catch { error }".  I believe that, as a minimum, the
      documentation of
      "catch" should be corrected.
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  6. Ticket change [3554c920b5] (rid 106904) by msofer on 2003-05-13 03:36:50:

    1. closedate changed to: "2003-05-12T20:36:50"
    2. closer changed to: "msofer"
    3. icomment:
      Logged In: YES 
      user_id=148712
      
      Ah, but this distinction has nothing to do with the [catch]
      command - it is described in the Tcl man page Tcl.n, rule
      [2]: when you invoke
         catch [error]
      the error occurs during the substitution phase, *before*
      [catch] is called (as it is, it never gets called).
      
      Note also that the (buggy) behaviour in 8.3 was inconsistent:
      
      % info patch
      8.3.4
      % catch [error]
      1
      % set c catch; $c [error]
      wrong # args: should be "error message ?errorInfo? ?errorCode?"
      
      
      
      
      
    4. login: "msofer"
    5. mimetype: "text/plain"
    6. username: "msofer"