Factor out the protect-from-exceptions helpers and make capture_events() use it.  This simplifies the individual tests a little.
Factor out the protect-from-exceptions helpers and make capture_events()
use it.  This simplifies the individual tests a little.

Added some new tests related to exception handling.

sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator