Как?
from gi.repository import GLib as glib
def foo():
print('bar')
return True
def bar():
raise Exception('fail')
glib.timeout_add_seconds(1, foo)
glib.timeout_add_seconds(2, bar)
# on exception in bar: print "hello world"
glib.MainLoop().run()