Lines Matching defs:exception
37 - result() and exception() do not take a timeout argument and
38 raise an exception when the future isn't done yet.
56 # A saved CancelledError for later chaining as an exception context.
93 # set_exception() was not called, or result() or exception()
94 # has consumed the exception
99 f'{self.__class__.__name__} exception was never retrieved',
100 'exception': exc,
130 it erases the saved context exception value.
184 Done means either that a result / exception are available, or that the
194 the future is done and has an exception set, this exception is raised.
206 def exception(self):
207 """Return the exception that was set on this future.
209 The exception (or None if no exception was set) is returned only if
265 def set_exception(self, exception):
266 """Mark the future done and set an exception.
273 if isinstance(exception, type):
274 exception = exception()
275 if type(exception) is StopIteration:
278 self._exception = exception
279 self._exception_tb = exception.__traceback__
337 exception = source.exception()
338 if exception is not None:
339 concurrent.set_exception(_convert_future_exc(exception))
357 exception = source.exception()
358 if exception is not None:
359 dest.set_exception(_convert_future_exc(exception))
368 The result (or exception) of source will be copied to destination.