'This method stores the current status and the exception for later
processing. If there are already too many stored exceptions for this
plugin then no action is taken.
:param current_status: Pointer to the core_helpers.status module
:param exception: The exception that was raised
:param exec_info: The exec info as returned by sys module
:param enabled_plugins: A string as returned by helpers.pprint_plugins.
First I thought about getting the enabled_plugins
after the scan finished, but that proved to be
an incorrect approach since the UI and/or
strategy could simply remove that information as
soon as the scan finished.
:return: None'

def handle(self, current_status, exception, exec_info, enabled_plugins):

    (except_type, except_class, tb) = exec_info
    if isinstance(exception, self.NO_HANDLING):
        raise exception, None, tb
    stop_on_first_exception = cf.cf.get('stop_on_first_exception')
    if stop_on_first_exception:
        raise exception, None, tb
    with self._lock:
        edata = ExceptionData(current_status, exception, tb, enabled_plugins)
        count = 0
        for stored_edata in self._exception_data:
            if ((edata.plugin == stored_edata.plugin) and (edata.phase == stored_edata.phase)):
                count += 1
        if (count < self.MAX_EXCEPTIONS_PER_PLUGIN):
            self._exception_data.append(edata)
            msg = edata.get_summary()
            msg += '    The    scan    will    continue    but    some    vulnerabilities    might    not    be    identified.'
            om.out.error(msg)
    filename = self.write_crash_file(edata)
    om.out.debug(('Logged    "%s"    to    "%s"' % (edata.get_exception_class(), filename)))
