'The user interfaces call this method to start the whole scanning
process.
@raise: This method raises almost every possible exception, so please
do your error handling!'

def start(self):

    om.out.debug('Called    w3afCore.start()')
    self.scan_start_hook()
    try:
        self.verify_environment()
    except Exception as e:
        error = 'verify_environment()    raised    an    exception:    "%s".    This    should    never    happen.    Are    you    (UI    developer)    sure    that    you    called    verify_environment()    *before*    start()    ?'
        om.out.error((error % e))
        raise
    om.manager.log_enabled_plugins(self.plugins.get_all_enabled_plugins(), self.plugins.get_all_plugin_options())
    self._first_scan = False
    try:
        self.strategy.start()
    except MemoryError:
        print(NO_MEMORY_MSG)
        om.out.error(NO_MEMORY_MSG)
    except OSError as os_err:
        if (os_err.errno == errno.ENOMEM):
            print(NO_MEMORY_MSG)
            om.out.error(NO_MEMORY_MSG)
        else:
            raise
    except IOError as (error_id, error_msg):
        if (error_id == errno.ENOSPC):
            msg = 'The    w3af    scan    will    stop    because    the    file    system    is    running    low    on    free    space.    Check    the    "%s"    directory    size,    overall    disk    usage    and    start    the    scan    again.'
            msg %= get_home_dir()
            print(msg)
            om.out.error(msg)
        else:
            raise
    except threading.ThreadError as te:
        handle_threading_error(self.status.scans_completed, te)
    except HTTPRequestException as hre:
        raise
    except ScanMustStopByUserRequest as sbur:
        om.out.information(('%s' % sbur))
    except ScanMustStopByUnknownReasonExc:
        raise
    except ScanMustStopException as wmse:
        error = 'The    following    error    was    detected    and    could    not    be    resolved:\n%s\n'
        om.out.error((error % wmse))
    except Exception as e:
        msg = 'Unhandled    exception    "%s",    traceback:\n%s'
        om.out.error((msg % (e, traceback.format_exc())))
        raise
    finally:
        time_spent = self.status.get_scan_time()
        om.out.information(('Scan    finished    in    %s' % time_spent))
        om.out.information('Stopping    the    core...')
        self.strategy.stop()
        self.scan_end_hook()
        self.status.scan_finished()
