Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 094fe8242a306700fd07342582831a9d5fc74cec
Ticket: 3603804fffffffffffffffffffffffffffffffff
misleading example in documentation of [try]
User & Date: uring on 2013-02-08 08:51:15
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    the documentation of the try command contains the following example:
    
    try {
        set f [open /some/file/name]
    } trap {POSIX EISDIR} {} {
        puts "failed to open /some/file/name: it's a directory"
    } trap {POSIX ENOENT} {} {
        puts "failed to open /some/file/name: it doesn't exist"
    }
    
    this (slightly) misleading, since (on unix) it is allowed to open a directory for reading, i.e. you will never get
    the message "failed to open /some/file/name: it's a directory".
    
    a simple fix would be to open for writing:  "try { set f [open /some/file/name w] ......" 
    
  4. foundin changed to: "current: 8.6.0"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "uring"
  10. subsystem changed to: "18. Commands M-Z"
  11. title changed to: "misleading example in documentation of [try]"
  12. type changed to: "Bug"