On Mon, Mar 9, 2009 at 3:47 AM, Antoine Martin <[email protected]> wrote:
> Adding this:
>    except (KeyboardInterrupt, SystemExit):
>        import sys
>        sys.exit(0)
> Before the except block at the end of
> wimpiggy/lowlevel/wimpiggy.lowlevel.bindings.pyx seems to help, but this
> is almost certainly not the right thing to do, is it?

It would make sense that that would help, because currently it's
explicitly swallowing all exceptions that occur inside our low-level
event handlers (and the focus-handling stuff gets called from the
low-level event handlers)! Oops.

The reason for this is that any exceptions that escape from there will
go to the gtk mainloop, and it mostly just ignores exceptions... so at
least this way we get a nice message. However, I wasn't thinking about
system exit exceptions when I added that (I had, ahem, other
exceptions to worry about), and I think the gtk mainloop may have
special handling for those anyway...

If, at the end of wimpiggy/lowlevel/wimpiggy.lowlevel.bindings.pyx, you replace

    except:
        log.warn("Unhandled exception in x_event_filter:", exc_info=True)

with

    except:
        log.warn("Unhandled exception in x_event_filter:", exc_info=True)
        raise

then does that still fix the problem for you? That would be a cleaner
solution if it works.

-- Nathaniel

_______________________________________________
Parti-discuss mailing list
[email protected]
http://lists.partiwm.org/cgi-bin/mailman/listinfo/parti-discuss

Reply via email to