'Sets the result of the future as being the given exception.
Should only be used by Executor implementations and unit tests.'

def set_exception(self, exception):

    self.set_exception_info(exception, None)
