code: def set_exc_info(self, exc_info):
          
          self._exc_info = exc_info
          self._log_traceback = True
          if not _GC_CYCLE_FINALIZERS:
              self._tb_logger = _TracebackLogger(exc_info)
  
          try:
              self._set_done()
          finally:
              # Activate the logger after all callbacks have had a
              # chance to call result() or exception().
              if self._log_traceback and self._tb_logger is not None:
                  self._tb_logger.activate()
          self._exc_info = exc_info
docs: Sets the exception information of a ``Future.``
  
          Preserves tracebacks on Python 2.
  
          .. versionadded:: 4.0