Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 3a3e1fabad1decba4e5d1b576164c4f1c496aaa2
Ticket: 219268ffffffffffffffffffffffffffffffffff
Catching errors at [vwait] instead of [bgerror]
User & Date: nobody on 2000-10-26 05:09:39
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 1347 RFE
    Version: 8.0.4
    SubmitDate: '1999-03-02'
    LastModified: '1999-03-02'
    Severity: SER
    Status: UnAssn
    Submitter: pat
    ChangedBy: pat
    OS: Other
    OSVersion: All OSes
    Machine: NA
    FixedDate: '2000-10-25'
    ClosedDate: '2000-10-25'
    
    
    Name:
    Alexandre FERRIEUX
    
    DesiredBehavior:
    Currently, when an error occurs in an event/after handler, it is handled
    by the bgerror mechanism: the info about error is saved, and an [after
    idle]
    is posted to pop up an error dialog later. Note that all this doesn't
    interrupt
    the surrounding [vwait]. This is fine for normal wish apps using the
    implicit 
    Tk event loop
    
    In more complex situations, the [vwait] is called by the programmer, and
    it 
    would be preferable that the errors be raised synchronously, i.e. they
    interrupt 
    the vwait. This way a [catch] of the vwait will do the right thing. For
    backward 
    compatibility, this new behavior could be activated by an option [vwait 
    -errors], or by a global variable [set ::tcl_vwait_errors 1].
    
    Of course, a workaround currently exists, but it is inelegant and
    inefficient:
    
    proc bgerror s {set ::_bgerror_var BGERROR:$s}
    proc vwait_e vvar {
    upvar #0 $vvar ::_bgerror_var
    vwait ::_bgerror_var
    if {[regexp {^BGERROR:(.*)$} $::_bgerror_var pipo res]} {error $res}
    return $::_bgerror_var
    }
    (The problem with this is that if you don;t want to wipe out an already
    defined 
    bgerror, you have to switch it back and forth with [rename]. If you have
    to do 
    this frequently, the performance is terrible.)
    
    
    
    
    
    
    
    
  4. foundin changed to: "obsolete: 8.0.4"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to: "Catching errors at [vwait] instead of [bgerror]"
  11. type changed to: "RFE"