code: def exc_handle(url, out, testing):
      
      quiet_exceptions = [ConnectionError, ReadTimeout, ConnectTimeout,
              TooManyRedirects]
      type, value, _ = sys.exc_info()
      if type not in quiet_exceptions or testing:
          exc = traceback.format_exc()
          exc_string = ("Line '%s' raised:\n" % url) + exc
          out.warn(exc_string, whitespace_strp=False)
  
          if testing:
              print(exc)
      else:
          exc_string = "Line %s '%s: %s'" % (url, type, value)
          out.warn(exc_string)
docs: Handle exception. If of a determinate subset, it is stored into a file as a
      single type. Otherwise, full stack is stored. Furthermore, if testing, stack
      is always shown.
      @param url: url which was being scanned when exception was thrown.
      @param out: Output object, usually self.out.
      @param testing: whether we are currently running unit tests.