def set_exception(self, exception):
        """Set the Future's exception."""
        self._exception = exception
        self._result_set = True
        self._invoke_callbacks(self)
def set_exception ( self , exception ) : self . _exception = exception self . _result_set = True self . _invoke_callbacks ( self )
Set the Future's exception.