Overview
| Artifact ID: | 3a3e1fabad1decba4e5d1b576164c4f1c496aaa2 |
|---|---|
| Ticket: | 219268ffffffffffffffffffffffffffffffffff
Catching errors at [vwait] instead of [bgerror] |
| User & Date: | nobody on 2000-10-26 05:09:39 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- 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.) - foundin changed to: "obsolete: 8.0.4"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "69. Other"
- title changed to: "Catching errors at [vwait] instead of [bgerror]"
- type changed to: "RFE"