Tk Library Source Code

View Ticket
Login
Ticket UUID: 1774995
Title: error in comm error processing
Type: Bug Version: None
Submitter: boakley Created on: 2007-08-15 21:21:42
Subsystem: comm Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2007-08-16 04:26:55
Resolution: Duplicate Closed By: andreas_kupries
    Closed on: 2007-08-15 21:26:55
Description:
(I woulda sworn I submitted this once; sorry if it's a duplicate)

In comm there is this code in proc CommRunHook. Notice how catch saves its output in "res" but the return statement for case 1 uses $result:

    ...
commDebug {puts stderr "<$chan> /interp $interp"}
set code [catch {interp eval $interp $cmd} res]
    } else {
commDebug {puts stderr "<$chan> /main"}
set code [catch {uplevel 1 $cmd} res]
    }

    # Perform the return code propagation promised
    # to the hook scripts.
    switch -exact -- $code {
0 {}
1 {
    return -errorinfo $::errorInfo -errorcode $::errorCode -code error $result
}
3 {return}
4 {}
default {return -code $code $res}
    }
User Comments: andreas_kupries added on 2007-08-16 04:26:55:
Logged In: YES 
user_id=75003
Originator: NO

Yes, a duplicate of [ 1774302 ] error in CommRunHook error handling, @ https://sourceforge.net/tracker/?func=detail&atid=112883&aid=1774302&group_id=12883

Already fixed in the CVS Head.