MCPcopy Create free account
hub / github.com/dask/dask / remote_exception

Function remote_exception

dask/multiprocessing.py:79–94  ·  view source on GitHub ↗

Metaclass that wraps exception type in RemoteException

(exc: Exception, tb)

Source from the content-addressed store, hash-verified

77
78
79def remote_exception(exc: Exception, tb) -> Exception:
80 """Metaclass that wraps exception type in RemoteException"""
81 if type(exc) in exceptions:
82 typ = exceptions[type(exc)]
83 return typ(exc, tb)
84 else:
85 try:
86 typ = type(
87 exc.__class__.__name__,
88 (RemoteException, type(exc)),
89 {"exception_type": type(exc)},
90 )
91 exceptions[type(exc)] = typ
92 return typ(exc, tb)
93 except TypeError:
94 return exc
95
96
97try:

Callers 2

test_remote_exceptionFunction · 0.90
reraiseFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_remote_exceptionFunction · 0.72