Exception hook. Catches crashes / un-caught exceptions and passes them to handle_payload()

        :param etype: Exception type
        :param evalue: Exception value
        :param tb: Traceback
        :return:

def exception_handler(self, etype, evalue, tb):
        """
        Exception hook. Catches crashes / un-caught exceptions and passes them to handle_payload()

        :param etype: Exception type
        :param evalue: Exception value
        :param tb: Traceback
        :return:
        """
        self.etype = etype
        self.evalue = evalue
        self.tb = tb
        self._recursion_error = "maximum recursion depth exceeded" in str(self.evalue)

        if etype:
            self.logger.info('CrashReporter: Crashes detected!')
            self.analyzed_traceback = self._analyze_traceback(tb)
            self.handle_payload(self.generate_payload(etype.__name__, '%s' % evalue, self.analyzed_traceback))
        else:
            self.logger.info('CrashReporter: No crashes detected.')

        self.forward_exception(etype, evalue, tb)