processing uncontrolled exceptions in a thread