segregated pyglet.media.dispatch_events() into separate try/catch