try to catch some of the swing errors.