Skip to content
Tcl Source Code History Of Ticket 536955ffffffffff
Login

History Of Ticket 536955ffffffffff

Artifacts Associated With Ticket 536955ffffffffff

  1. Ticket change [96c6a3f335] (rid 106383) by dgp on 2002-03-29 23:50:10:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      % info patch
      8.3.4
      % proc mybreak {} {return -code break}
      % catch mybreak
      3
      % proc breaktest {} {mybreak}
      % list [catch breaktest msg] $msg
      1 {invoked "break" outside of a loop}
      % proc lucky {} {return -code 7}
      % catch lucky
      7
      % proc luckytest {} {lucky}
      % list [catch luckytest msg] $msg
      7 {}
      
      It would be more consistent if the only way
      to pass back a non-TCL_OK, non-TCL_ERROR
      return code from a proc was by using the
      [return -code] command itself.
      
      I'd rather see:
      
      % list [catch luckytest msg] $msg
      1 {command returned bad code: 7}
      
      
      
    4. foundin initialized to: "obsolete: 8.4a5"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "dgp"
    9. subsystem initialized to: "22. [proc] and [uplevel]"
    10. title initialized to: "inconsistent return code handling"
    11. type initialized to: "Bug"
  2. Ticket change [414153d64a] (rid 116155) by dgp on 2002-03-30 06:52:53:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      A related problem:
      
      % proc test {} {
              # Imagine hundreds of lines here
              break
              # And hundreds more
      }
      % test
      invoked "break" outside of a loop
      % set errorInfo
      invoked "break" outside of a loop
          while executing
      "test"
      
      
      Would be much better if ProcessProcResultCode
      not only converted TCL_BREAK -> TCL_ERROR, but
      also added good context to the ErrorInfo.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  3. Ticket change [467d2b0ee9] (rid 99529) by dgp on 2002-03-30 07:13:02:

    1. icomment:
      
      
      File Added - 20299: proc.patch
      
      Logged In: YES 
      user_id=80530
      
      Here's a patch that does both things.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [2906bbf910] (rid 88804) by dgp on 2002-03-30 07:15:46:

    1. icomment:
      
      
      File Deleted - 20299: 
      
      
      
      File Added - 20300: proc.patch
      
      Logged In: YES 
      user_id=80530
      
      D'oh!  Let's try that patch again...
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  5. Ticket change [dad65c517f] (rid 107859) by dgp on 2002-03-30 07:26:31:

    1. icomment:
      
      
      File Added - 20301: proc.patch2
      
      Logged In: YES 
      user_id=80530
      
      updated patch contains changes to test suite too
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Ticket change [e720bd526b] (rid 104401) by msofer on 2002-03-30 09:19:53:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      I'm not sure about this one: it could break a lot of user
      code, and destroy functionality that I think is valuable.
      In particular, custom exception handling code may depend on
      the return code being passed up the stack, without requiring
      every intervening command to catch/rethrow the exception
      code. 
      This would force such code to either catch/rethrow at each
      stage, or else to do receive a TCL_ERROR and pass the
      exception type in a different manner - quite an expensive
      proposition (see the latest catch.bench in tclbench).
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  7. Ticket change [d12736a936] (rid 113302) by dgp on 2002-03-31 00:31:39:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      After sleeping on  it, I agree that the inconsistency
      argument doesn't make sense.  Yes, [return -code 7] is
      inconsistent with [return -code break], but it is 
      consistent with [return -code error].  One had to be
      chosen, and the choice is already made and should not
      be changed now.
      
      I think I've heard of some people defining an "exit"
      return code to give them a way to exit their program.
      That usage needs the "exception-like" behavior of
      extended return codes.
      
      What do you think about the improved stack trace for
      [break] and [continue] errors though?  
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. title changed to: "improve [break] error strack trace"
    5. username: "dgp"
  8. Ticket change [0d9378e0a1] (rid 114389) by dgp on 2002-04-06 04:52:25:

    1. icomment:
      
      
      File Deleted - 20301: 
      
      
      
      File Added - 20639: proc.patch3
      
      Logged In: YES 
      user_id=80530
      
      Here's an updated patch that only improves the stack
      trace for [break] and [continue].
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  9. Add attachment "proc.patch3" [3e39f650f1] (rid 121225) by dgp on 2002-04-06 04:52:25.

  10. Ticket change [4c5afad4e3] (rid 126878) by msofer on 2002-04-16 00:45:54:

    1. closedate changed to: "2002-04-15T17:45:54"
    2. closer changed to: "msofer"
    3. icomment:
      Logged In: YES 
      user_id=148712
      
      Committed the improved stack trace patch.
      
      
    4. login: "msofer"
    5. mimetype: "text/plain"
    6. resolution changed to: "Accepted"
    7. status changed to: "Closed"
    8. username: "msofer"