Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 96c6a3f335ba28015204e7de284005dd3e9b3309
Ticket: 536955ffffffffffffffffffffffffffffffffff
improve [break] error strack trace
User & Date: dgp on 2002-03-29 23:50:10
Changes

  1. assignee changed to: "msofer"
  2. cmimetype changed to: "text/plain"
  3. comment changed 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 changed to: "obsolete: 8.4a5"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "dgp"
  9. subsystem changed to: "22. [proc] and [uplevel]"
  10. title changed to: "inconsistent return code handling"
  11. type changed to: "Bug"