Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 09e4dbc57eaa8d8f558b74969e13b664da6397b9
Ticket: 219150ffffffffffffffffffffffffffffffffff
"catch" doesn't catch "expr" syntax errors
User & Date: dgp on 2000-11-09 02:55:44
Changes

  1. assignee changed to: "dgp"
  2. closedate changed to: "2000-11-08T19:55:44"
  3. closer changed to: "dgp"
  4. icomment:
    According to the release notes accompanying Tcl 8.0,
    this is not a bug, but a known incompatibility with
    Tcl 7 introduced by the bytecode compiler.  Point 2
    on page
    
    http://dev.scriptics.com/doc/compiler.html
    
    reads:
    ...
    2.Catch no longer catches compilation errors 
    
        One consequence of the fact that in Tcl 8.0 compilation errors in scripts are returned immediately is that
        catch no longer prevents compilation errors from aborting command interpretation. For example, 
    
        catch {set} 
    
        immediately reports the error 
    
        wrong # args: should be "set varName ?newValue?" 
    
        To have catch handle compile time errors, give it a script that is only determined at runtime: for example, 
    
        catch [concat {set}] 
    ...
    
    Perhaps this incompatibility wasn't a good idea, but it's
    known and documented, so it's not a bug.  I'm marking this
    Invalid and Closing it.  If you want this changed, file a TIP.
    
    
  5. login: "dgp"
  6. mimetype: "text/plain"
  7. resolution changed to: "Invalid"
  8. status changed to: "Closed"
  9. username: "dgp"