Added check for exception during the setup of bugsense