Skip to content

Commit

Permalink
Re-raise with reference on error
Browse files Browse the repository at this point in the history
  • Loading branch information
gen-xu committed Sep 14, 2021
1 parent cef6d35 commit d8a39d7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/dependency_injector/providers.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,10 @@ cdef inline object __call(
asyncio.ensure_future(args_kwargs_ready)

return future_result

return call(*args, **kwargs)
try:
return call(*args, **kwargs)
except Exception as exception:
raise Exception(call) from exception


cdef inline void __async_call_callback(object future_result, object call, object future):
Expand Down

0 comments on commit d8a39d7

Please sign in to comment.