Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 263cb4184ddc451a63e346630b9c2f2c5fefa348
Ticket: 2971921fffffffffffffffffffffffffffffffff
Bytecode compiled try misses finally handler
User & Date: cyan on 2010-03-17 12:30:14
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Tcl from CVS on 2010-03-14 on Linux (Ubuntu 9.10 x86_64)
    
    When a bytecode compiled try command throws an error in the body, which is caught in a trap {...} handler, the finally handler is not executed.
    
    The following script reliably reproduces the problem for me:
    
    proc go {} {
        try {
            puts "In try body"
            throw {bar} "hello"
        } trap {bar} {res options} {
            puts "trapped bar"
        } finally {
            puts "in finally"
        }
        puts "after try"
    }
    
    go
    
    puts "-----------------"
    try {
        puts "In try body"
        throw {bar} "hello"
    } trap {bar} {res options} {
        puts "trapped bar"
    } finally {
        puts "in finally"
    }
    puts "after try"
    
    
    Expected output: 
    
    In try body
    trapped bar
    in finally
    after try
    -----------------
    In try body
    trapped bar
    in finally
    after try
    
    
    Problem output:
    In try body
    trapped bar
    after try
    -----------------
    In try body
    trapped bar
    in finally
    after try
    
    
    The behaviour changed with the CVS commit "Compilation of [try] now enabled!" by dkf on 2010-02-09 22:51:53.
    
  4. foundin changed to: "obsolete: 8.6b1.1"
  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: "cyan"
  10. subsystem changed to: "18. Commands M-Z"
  11. title changed to: "Bytecode compiled try misses finally handler"
  12. type changed to: "Bug"