':return: A string with a summary of the exceptions found during the
current scan. This is mostly used for printing in the console
but can be used anywhere.
@see: generate_summary method for a way of getting a summary in a
different format.'

def generate_summary_str(self):

    fmt_with_exceptions = 'During    the    current    scan    (with    id:    %s)    w3af    caught    %s    exceptions    in    it\'s    plugins.    The    scan    was    able    to    continue    by    ignoring    those    failures    but    the    result    is    most    likely    incomplete.\n\nThese    are    the    phases    and    plugins    that    raised    exceptions:\n%s\nWe    recommend    you    report    these    vulnerabilities    to    the    developers    in    order    to    help    increase    the    project\'s    stability.\nTo    report    these    bugs    just    run    the    "report"    command.'
    fmt_without_exceptions = 'No    exceptions    were    raised    during    scan    with    id:    %s.'
    summary = self.generate_summary()
    if summary['total_exceptions']:
        phase_plugin_str = ''
        for phase in summary['exceptions']:
            for (plugin, fr, exception, traceback) in summary['exceptions'][phase]:
                phase_plugin_str += ('-    %s.%s\n' % (phase, plugin))
        with_exceptions = (fmt_with_exceptions % (self.get_scan_id(), summary['total_exceptions'], phase_plugin_str))
        return with_exceptions
    else:
        without_exceptions = (fmt_without_exceptions % self.get_scan_id())
        return without_exceptions
