Wrap sensitive callbacks in a try-catch block