Handle exceptions generated by event handlers