MCPcopy Index your code
hub / github.com/RustPython/RustPython / _convert_future_exc

Function _convert_future_exc

Lib/asyncio/futures.py:326–333  ·  view source on GitHub ↗
(exc)

Source from the content-addressed store, hash-verified

324
325
326def _convert_future_exc(exc):
327 exc_class = type(exc)
328 if exc_class is concurrent.futures.CancelledError:
329 return exceptions.CancelledError(*exc.args).with_traceback(exc.__traceback__)
330 elif exc_class is concurrent.futures.InvalidStateError:
331 return exceptions.InvalidStateError(*exc.args).with_traceback(exc.__traceback__)
332 else:
333 return exc
334
335
336def _set_concurrent_future_state(concurrent, source):

Callers 2

_copy_future_stateFunction · 0.85

Calls 1

with_tracebackMethod · 0.80

Tested by

no test coverage detected