Improve reporting of unhandled exceptions.