@run_in_both(HandlerFail, "', 1, 1]")
def test_handler_exception1(HandlerFail):
    res = []
    
    m = HandlerFail()
    def handler(*events):
        raise IndexError('bla')
    handler = m.connect(handler, 'foo')
    
    # Does not fail when triggered
    m.foo = 3
    m.foo = 42
    m.failing_handler.handle_now()
    handler.handle_now()
    
    # But calling directly fails
    try:
        m.failing_handler()
    except IndexError:
        res.append(1)
    try:
        handler()
    except __HOLE__:
        res.append(1)
    
    return ["!!!!"] + res  # trick to ditch stderr in JS


## Dynamism
dataset/ETHPy150Open zoofIO/flexx/flexx/event/tests/test_both.py/test_handler_exception1