Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 2174be3c9d9e026ccd56ca0d26145754aa424d74
Ticket: 916871ffffffffffffffffffffffffffffffffff
[catch] docs should define `exceptional returns'
User & Date: eriklns on 2004-03-15 20:47:12
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    The manpage for [catch] mentions as the cases that are
    trapped:
    - errors
    - exceptional returns
    
    About the latter, it leaves for the user to refer to
    "tcl.h" to look up the complete list of return codes
    that are trapped, while explaining some of them later
    in the text (break, continue).
    
    This leaves much room for misinterpretation.
    I think it is better to:
    - adequatel define the term `exceptional return'
    - explicitly mention all the Tcl commands and
    corresponding return codes that are trapped
    
    A special cases of misunderstanding is the "normal
    return" which in this context is considered an
    "exceptional return" because it appears to be trapped:
    
    proc catchReturn {} {
        if {[catch {
            return
        } err]} {
        puts $err
        }
    }
    catchReturn
    
    
    Sincerely,
    
    Erik Leunissen
    
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "eriklns"
  9. subsystem changed to: "None"
  10. title changed to: "[catch] docs should define `exceptional returns'"
  11. type changed to: "Bug"