Skip to content

Commit

Permalink
feat: exc origin
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler committed Oct 6, 2023
1 parent fdb8b9f commit 88099da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion a_sync/_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def _await(awaitable: Awaitable[T]) -> T:
return get_event_loop().run_until_complete(awaitable)
except RuntimeError as e:
if str(e) == "This event loop is already running":
raise SyncModeInAsyncContextError from None
raise SyncModeInAsyncContextError from e
raise ASyncRuntimeError(e) from e

def _asyncify(func: SyncFn[P, T], executor: Executor) -> CoroFn[P, T]: # type: ignore [misc]
Expand Down

0 comments on commit 88099da

Please sign in to comment.