Menu

#2575 [selection handle] errors are silently discarded

obsolete: 8.6b2
closed-fixed
5
2014-08-21
2008-12-17
Andy Goth
No

If the command registered by [selection handle] returns an error, the error is silently discarded. The background error handler does not see it.

Discussion

  • Donal K. Fellows

    Fixed in HEAD; errors now go to bgerror mechanism. Note that if someone was relying on the old behavior, they may be impacted by this. (Their code was always dodgy, but even so...)

     
  • Donal K. Fellows

    • assigned_to: hobbs --> dkf
    • status: open --> closed-fixed
     
  • Jan Nijtmans

    Jan Nijtmans - 2012-06-26
    • milestone: 874758 --> obsolete: 8.6b2
    • status: closed-fixed --> open
     
  • Jan Nijtmans

    Jan Nijtmans - 2012-06-26

    test-case select-5.15, which was written to test for bug-2441988,
    is failing in head, since ages. Does that mean that
    bug-2441988 is re-introduced, or is something else
    going on, like interactioon with [interp bgerror]?

    ==== select-5.15 Tk_GetSelection procedure FAILED
    ==== Contents of test case:

    proc ::bgerror msg {lappend ::bgerrors $msg}
    selection handle .f1 ERROR errHandler
    list [catch {selection get ERROR} msg] $msg [update] {*}$::bgerrors

    ---- Result was:
    1 {PRIMARY selection doesn't exist or form "ERROR" not defined} {}
    ---- Result should have been (exact matching):
    1 {PRIMARY selection doesn't exist or form "ERROR" not defined} {} {selection handler aborted}
    ==== select-5.15 FAILED

     
  • Jan Nijtmans

    Jan Nijtmans - 2012-07-01

    Hey, if I change the syntax to:
    selection handle -type ERROR .f1 errHandler
    then the test passes.

    committed to trunk now. At least this shows that
    errors are still catched using the new "select"
    syntax. Apparently not with the old syntax.
    But it never did - anyway - so this is not
    a regression.

    Donal, agreed? I think this one can be closed.

     
  • Jan Nijtmans

    Jan Nijtmans - 2012-07-01
    • status: open --> pending-fixed
     
  • Donal K. Fellows

    • status: pending-fixed --> closed-fixed
     
  • Donal K. Fellows

    Confirmed the fix.

     
MongoDB Logo MongoDB