Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error handling #509 #528

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/dependency_injector/providers.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import copy
import errno
import functools
import inspect
import logging
import os
import re
import sys
Expand Down Expand Up @@ -204,7 +205,11 @@ cdef class Provider(object):
if self.__last_overriding is not None:
result = self.__last_overriding(*args, **kwargs)
else:
result = self._provide(args, kwargs)
try:
result = self._provide(args, kwargs)
except Exception as exc:
logging.debug(str(self))
raise exc

if self.is_async_mode_disabled():
return result
Expand Down